How to determine when Saver has been applied?

Announcements, support questions, and discussion for Quest Machine.
Post Reply
mroshaw
Posts: 96
Joined: Wed Jan 19, 2022 4:10 am

How to determine when Saver has been applied?

Post 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!
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to determine when Saver has been applied?

Post by Tony Li »

mroshaw
Posts: 96
Joined: Wed Jan 19, 2022 4:10 am

Re: How to determine when Saver has been applied?

Post by mroshaw »

DOH! Staring me right in the face! Thanks Tony!
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to determine when Saver has been applied?

Post by Tony Li »

Glad to help!
Post Reply