void Initialise() { if (mode == LoopMode.SingleClip) { clip = AAE_Clip.GetComponent <AAEClip> (); if (clip == null) { Debug.LogError("AAE MusicLooper: ERROR! It seems you've forgotten to drag in your clip of choice in the 'AAE_File' slot!"); } } else if (mode == LoopMode.Playlist) { origName = Playlist.name; Playlist = (GameObject)Instantiate(Playlist, transform.position, Quaternion.identity); Playlist.name = origName; Playlist.transform.parent = this.transform; playlist = Playlist.GetComponent <AAEMusicPlaylist> (); if (playlist == null) { Debug.LogError("AAE MusicLooper: ERROR! It seems you've forgotten to drag in your playlist of choice in the 'Playlist' slot!"); } } oldVolume = 1; if (startOnPlay) { Play(); } }
public override void OnInspectorGUI() { AAEMusicPlaylist playlist = (AAEMusicPlaylist)target; playlist.mode = (AAEMusicPlaylist.PlayListMode)EditorGUILayout.EnumPopup("Playlist Mode", playlist.mode); serializedObject.Update(); list.DoLayoutList(); serializedObject.ApplyModifiedProperties(); // private ReorderableList list; // // list = new ReorderableList(property.serializedObject, property.FindPropertyRelative("tagList"), true, true, true, true); // list.drawHeaderCallback += rect => GUI.Label(rect, label); // list.drawElementCallback += (rect, index, active, focused) => // { // rect.height = 16; // rect.y += 2; // EditorGUI.PropertyField(rect, // list.serializedProperty.GetArrayElementAtIndex(index), // GUIContent.none); // }; // list.DoList(position); }