localScale returns 1 even though inspector states 0.1, 0.2, 0.4

Hello,
I instantiated 3 gameobjects of differing x scales i.e. 0.1, 0.2, 0,4.
When I read transform.localScale.x of those gameobjects I get 1 in all instances.
I scroll through the hierarchy to each GO and the inspector shows each its own scale
But Debug.Log show 1 and game logic works as if the scales are all 1s.
I dont know what to do.
Thank you.

Print the .name of the Transform you’re getting the localRotation out of. I bet it’s something else.

Thank you sir. It was. Too much logic in the way.
Had to post to get a distraction. Went back to code and saw the mess.

2 Likes

Debug.Log() is always my best friend. :slight_smile:

And for all the folks saying “JUST ATTACH THE DEBUGGER,” I say

“You attach the debugger and watch your game FREEZE on a breakpoint. I’ll keep playing my game and have a big log of all the values.”

Oldskool FTW.

1 Like