GameObject scale set to 1 when timeline plays in play-mode

I’ve added a simple animation clip to my timeline that does a sprite animation.
The object has a Animator and with an animation controller and if I play the timeline in edit-mode the cutscene works perfectly, but if I run it in play-mode all sorts of weird stuff happens like the scale of the object getting set to 1 instead of 0.5. This behaviour disappears when I remove the animation controller from the object.

But my question is: is this expected behaviour? And is there a way to have an animation controller AND still keep the exact transform in play-mode?

In edit mode, the controller isn’t run, but in playmode it is run before timeline, and timeline blends onto it. If the problem is the controller is setting certain properties that timeline isn’t animating, you may need to add an override track and explicitly key those properties.

Okay, I didn’t think that the animation controller actually changed any properties that are not part of the animation it is playing? Since none of the animation clips are actually changing the scale. But I might have misunderstood how the controller works.

I’ll look into the override track, thanks for the suggestion!

@seant_unity where does the scale change come from, if the animation clips don’t scale the object and nothing in the timeline actually sets the scale?
It can’t be expected behaviour that the scale of an object is reset just by having an animation controller?

Is it possible that I might have overlooked somewhere, where the scale is actually set to 1?

That’s a bit strange if both the controller and timeline aren’t playing animation clips that change scale. If the objects scene value (outside of timeline, in edit mode) is actually 0.5, then it’s possible something (controller, timeline) is overwriting it, but I can’t think of what that could be. Or the default values are getting overwritten somewhere (more likely in the controller, since timeline doesn’t have the option to write default values).

Sorry, I’m a bit stumped. I wish I could be of more help.

I’m not sure what is causing it, but I’m doing a workaround right now and that’s fine for now.
I’ll let you know if I actually find the cause.

This happens to me also, the timeline makes the gameobject scale to 1

1 Like

I am also having this issue! Did any of you find a fix?

Edit: Never mind. There seems to be a weird glitch where my scaled parent obj was reverting to 1 on play. I fixed it by unparenting.