示例#1
0
        private 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();
                }
            };
        }
 private static void OnEnterPlayMode()
 {
     FetchSavedDeclarations();
     MergeInitialAndSavedDeclarations();
     VariablesSaver.Instantiate();
 }