Page 1 of 1

How to determine when Saver has been applied?

Posted: Sun May 14, 2023 5:56 am
by mroshaw
Hi! I'm building my Load / Save system using the fantastic SaveSystem components. I have one such component, where I want to run some code when I'm confident that the saver has been applied. For example, if I have a "PositionSaver" on a GameObject, I want to be able to refer to the GameObject transform and be confident that the position and rotation reflect that of the game save.

I've tried hooking into SaveSystem.sceneLoaded and SaveSystem.loadEnded, but the transform doesn't appear to have been updated at the point those events are triggered.

Am I on the right track? Is there another event that I can hook into for this purpose?

Many thanks again!

Re: How to determine when Saver has been applied?

Posted: Sun May 14, 2023 8:21 am
by Tony Li

Re: How to determine when Saver has been applied?

Posted: Sun May 14, 2023 9:56 am
by mroshaw
DOH! Staring me right in the face! Thanks Tony!

Re: How to determine when Saver has been applied?

Posted: Sun May 14, 2023 11:06 am
by Tony Li
Glad to help!