Save During Play - Broken

Hello,

Used v 2.0

I tried to use Cinemachine and extend it with better Input Modules. (Who uses Input.axis?)
But if I add a MonoBehaviour to a gameObject which has a VirtualCamera on it
all variables of that MonoBehaviour are getting “saved during playmode”.

I did NOT register my MonoBehaviour for saving.

Second Problem.
If you add 2 (two) MonoBehaviours of the same type to a gameObject and enable saving (or don’t but it saves it anyway because of Cinemachine). All variables of both MonoBehaviours are getting set to the same values.

This is super annyoing and only fixed by adding more hierarchy.

Otherwise the System seems useable. But the FreeLook script is not extendable in any way.
You should use some virtual stuff :smile:

Thanks for the great feedback! You’re right about SaveDuringPlay. Even though it’s a stopgap while waiting for a more general solution, it shouldn’t be annoying. I’ll add a todo item for the things you bring up, and let you know when we have some improvements.

@ADoby Thanks again for your feedback. FYI we’ve implemented some changes in SaveDuringPlay to make it less annoying. It’s now opt-in rather than opt-out, so any custom behaviours you add to vcams will no longer automatically get SaveDuringPlay’ed, unless you opt-in by adding the [SaveDuringPlay] attribute to them. Also, SaveDuringPlay will no longer confound multiple instances of a behaviour on a single object. These changes will show up in the next beta of CM.

Thanks for the fast work