Exemplo n.º 1
0
 /// <summary>
 /// Create the main runtime profile with the given value store.
 /// </summary>
 /// <remarks>
 /// This method is automatically called by <see cref="T:sttz.Trimmer.Editor.BuildManager"/>
 /// and <see cref="ProfileContainer"/> and should not be called manually.
 /// </remarks>
 public static void CreateMain(ValueStore store)
 {
     if (Main == null)
     {
         Main = new RuntimeProfile(store);
     }
     else
     {
         Main.Store = store;
     }
 }
Exemplo n.º 2
0
        void OnEnable()
        {
            if (Instance != null)
            {
                Debug.LogWarning("Multiple ProfileContainers loaded!");
                DestroyImmediate(gameObject);
                return;
            }

            Instance = this;
            DontDestroyOnLoad(gameObject);

            if (RuntimeProfile.Main == null)
            {
                RuntimeProfile.CreateMain(store);
                RuntimeProfile.Main.Apply();
            }
        }