private void UnloadAssets() { if (!(GetFabricManager.Instance() == null)) { for (int i = 0; i < assetsToLoad.Length; i++) { FabricManager.Instance.UnloadAsset(assetsToLoad[i].destinationPath + "_" + assetsToLoad[i].prefabToLoad); } } }
private static void CreateGameObject() { if (GetFabricManager.Instance() != null) { return; } GameObject gameObject = new GameObject("Audio"); gameObject.AddComponent <FabricManager>(); gameObject.AddComponent <EventManagerEx>(); }
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(); } } }
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); }
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); }