Пример #1
0
 private void UnloadAssets()
 {
     if (!(GetFabricManager.Instance() == null))
     {
         for (int i = 0; i < assetsToLoad.Length; i++)
         {
             FabricManager.Instance.UnloadAsset(assetsToLoad[i].destinationPath + "_" + assetsToLoad[i].prefabToLoad);
         }
     }
 }
Пример #2
0
        private static void CreateGameObject()
        {
            if (GetFabricManager.Instance() != null)
            {
                return;
            }
            GameObject gameObject = new GameObject("Audio");

            gameObject.AddComponent <FabricManager>();
            gameObject.AddComponent <EventManagerEx>();
        }
Пример #3
0
 private void LoadAssets()
 {
     if (!(GetFabricManager.Instance() == null))
     {
         for (int i = 0; i < assetsToLoad.Length; i++)
         {
             FabricManager.Instance.LoadAsset(assetsToLoad[i].prefabPath + "/" + assetsToLoad[i].prefabToLoad, assetsToLoad[i].destinationPath);
         }
         for (int j = 0; j < eventTriggers.Length; j++)
         {
             eventTriggers[j].PostEvent();
         }
     }
 }
Пример #4
0
        public static string GetFabricEditorPath()
        {
            string text = "Assets/Fabric/Editor";

            if (GetFabricManager.Instance() != null)
            {
                text = GetFabricManager.Instance()._fabricEditorPath;
                if (!Directory.Exists(text))
                {
                    GetFabricManager.Instance()._fabricEditorPath = AudioManagerEngineEditor.SetFabricEditorPath(text);
                }
            }
            return(text);
        }
Пример #5
0
        public Preset CreatePreset(string name)
        {
            if (GetFabricManager.Instance() == null)
            {
                return(null);
            }
            _groupComponents = GetFabricManager.Instance().gameObject.GetComponentsInChildren <GroupComponent>();
            _presetList      = base.gameObject.GetComponentsInChildren <Preset>();
            for (int i = 0; i < _presetList.Length; i++)
            {
                if (_presetList[i].Name == name)
                {
                    return(null);
                }
            }
            GameObject gameObject = new GameObject(name);
            Preset     preset     = gameObject.AddComponent <Preset>();

            preset.transform.parent = base.transform;
            preset.Init(_groupComponents, name);
            _presetList = base.gameObject.GetComponentsInChildren <Preset>();
            return(preset);
        }