Search Unity

Save During Play - Broken

Discussion in 'Timeline' started by ADoby, May 18, 2017.

  1. ADoby

    ADoby

    Joined:
    Dec 10, 2012
    Posts:
    21
    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 :D
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,619
    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.
     
  3. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,619
    @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.
     
  4. ADoby

    ADoby

    Joined:
    Dec 10, 2012
    Posts:
    21
    Thanks for the fast work