Exemplo n.º 1
0
        internal static void OnEnterPlayMode()
        {
            FetchSavedDeclarations();
            MergeInitialAndSavedDeclarations();

            // The variables saver gameobject is only instantiated if its needed
            // It's only needed if a variable in our merged collection changes, requiring re-serialization as
            // the runtime ends
            merged.OnVariableChanged += () =>
            {
                if (VariablesSaver.instance == null)
                {
                    VariablesSaver.Instantiate();
                }
            };
        }
Exemplo n.º 2
0
 private static void OnEnterPlayMode()
 {
     FetchSavedDeclarations();
     MergeInitialAndSavedDeclarations();
     VariablesSaver.Instantiate();
 }