#Cant set a transform localscale in the Start function

1 messages · Page 1 of 1 (latest)

unkempt gale
#

Why can't I set a transform's localscale in the Start function?

versed hill
#

You can. Show code

unkempt gale
#

OK, this is Awake but

#

I also do manage to flip it in FixedUpdate later

versed hill
#

Don’t look like it throwing any errors to me

#

What’s wrong

unkempt gale
#

It just doesn’t do it

versed hill
#

Is the if statement being calle

unkempt gale
#

Let me check when I get back

#

But I don’t see why it wouldn’t be

versed hill
#

There’s nothing wrong with the code. If it’s not working, it’s something outside of the code. Either transform.position.x never becomes more than 1, for some reason the script isn’t running, etc.

unkempt gale
#

I think I know what it is

#

Some code in FixedUpdate is overriding the flipping code