Changing Scale property in Code

Hello all!

I need to flip a plane with a texture on it to sometimes it’s backwards. What I normally do is when testing, I will enter in the transform.scale.x and set it to “-128” for backwards and “128” when I want it normal. (Think arrow texture pointing left, and swapping the scale to negative points the arrow texture to the right)

Is there a way in c# that I can call something like “transform.scale.x” and set this, much like you can do “transform.position.x”?

Thanks!

its localScale on the transform what you are looking for

Yes, I tried that, but it said it was read only (unless I coded in incorrectly)

[EDIT]

I forgot, in C# I needed to do:
tranform.localScale = new Vector3(-128,1,96);

This may work, I will let you know if it doesn’t.

Thanks for the help!

[EDIT EDIT]
Yeap, that worked. Thanks!