- Home /
Question by
ShookLyngs · Jul 18, 2020 at 04:32 PM ·
animator2d animationlocalscale
using Animator component on a Prefab, and failed to change transform.localScale
Found some topics about the problem, but I still can't solve it, real hard.
Here's the backgound:
created a GameObject, and named it 'Player'
created a 2D bone as a children of 'Player', and named it 'Body'
bind some components, like 'Rigidbody', 'Box Collider', write some scripts to get 'Player' moving
bind 'Animator' component, and made some 2D bone animations
the default Scale.x of 'Player' is 1
start the game, and use WASD to move the Player
Scale.x of 'Player' is always 1(based on what it was when game started)
even I wrote codes tried to change it, it just won't works
I'm using Unity 2020.1
didn't have any key using Scale of 'Player'
Can someone please help?
Comment