Trouble Finding LocalScale

Hi all,
I’m currently working on my first 2D gaming project for unity. My problem is that my character’s local scale information from the inspector does not match the local scale information from the console when I use Debug.Log.

I am accessing the local scale via gameObject.transform.localScale, so that I can get the scale information from the specific game object. The character’s local scale value when facing right should be (1,1,1) and when facing left (-1,1,1), however, the console only says that it is (1,1,1) regardless of the direction I am facing. I’ve looked at a couple of threads with similar problems but I couldn’t find any solutions.

Does anyone know why this is happening or have any idea as how to get the proper value?

Any help would be very much appreciated!

edit.) Here is the code I use to change the local scale x value:

void flip(){// I call this when I move right or left        
        UnityEngine.Vector3 currentScale = gameObject.transform.localScale;
        currentScale.x *= -1;
        gameObject.transform.localScale = currentScale;

        facingRight = !facingRight;  

    }

That’s your assessment. However the console does not have a personality and does not say things it has on its mind. So you have to have some kind of Debug.Log statement that probably prints out the scale, right? Where is that code (which script) and when is it actually called (which callback / which method chain)? Are you sure you’re printing out the localScale of the correct gameobject?

When you compare what you print out to the inspector, which object did you inspect? Do you have several objects in a hierarchy? You have to give more context here. Saying you’re doing something, you’re seeing something isn’t really explaining your case very well.