Cant save transform of object with an animator attached.

Hi. Sorry to have to ask a noob question but I’m really stuck and i cant figure this out by myself.

I’m messing around with making a 3d fps game in c# with Unity. I have a save script that uses serialisation to store the transform and rotation of my 3d object between sessions using F6 and F9. When i attach the save script to my object i can move it and save it and close the game and when i reload my save, the object is where i saved it. I want to use this for doors. So i set it up as a sliding door, added an animation in unity that moved it up on the Y axis. When i save with the door in the air and load. The door is back down again and i cant get it to stay up on load. I’ve read so many forum posts but i cant find one with the answer that works for me. I can paste my code in here if it helps. It works without the animator attached but not with it. I spent 2 days already and its driving me mad. Sorry for the poor formatting, i don’t make forum posts very much.

I have the latest build of Unity and Visual Studio. The save script works on my player and my car just not on objects with an animator attached.

Sorry to waste your time if you get this question a lot. Thank you.

What’s happening is most likely that the animator is overruling the saved information. So for each of your doors, it’s going from down => to up (due to your save information) => back down because the animator starts in the down position. get it? You’ll need to first determine if it should be in the up or down position and on start when your load the information set the animators accordingly.

In other words, you save may be working just fine, its the animators that are updating after the saved state is given to them due to their default animation state.