/// <summary> /// Refreshes the theme and mode popup values. /// </summary> protected void RefreshPopups() { InteractiveMusicTheme[] themes = themesProp.GetArray <InteractiveMusicTheme>(); themeNames = InteractiveMusic.GetThemeNames(themes); InteractiveMusicTheme theme = themes.Length == 0 ? null : themes[currentThemeProp.intValue]; modeNames = InteractiveMusic.GetModeNames(theme); }
/// <summary> /// Use this for initialization. /// </summary> void Start() { if (music == null) { music = (InteractiveMusic)FindObjectOfType(typeof(InteractiveMusic)); if (music == null) { Debug.LogWarning("An instance of InteractiveMusic cannot be found."); } } }
/// <summary> /// Refreshes the theme and mode popup values. /// </summary> protected void RefreshPopups() { if (musicProp.objectReferenceValue == null) { themeNames = new string[0]; enterModeNames = new string[0]; exitModeNames = new string[0]; return; } InteractiveMusicTheme[] themes = ((InteractiveMusic)musicProp.objectReferenceValue).themes; themeNames = InteractiveMusic.GetThemeNames(themes); InteractiveMusicTheme enterTheme = themes.Length == 0 ? null : themes[enterThemeProp.intValue]; enterModeNames = InteractiveMusic.GetModeNames(enterTheme); InteractiveMusicTheme exitTheme = themes.Length == 0 ? null : themes[exitThemeProp.intValue]; exitModeNames = InteractiveMusic.GetModeNames(exitTheme); }
void Start() { music = GetComponent <InteractiveMusic>(); }
/// <summary> /// Use this for initialization. /// </summary> void Start() { if (music == null) { music = (InteractiveMusic)FindObjectOfType(typeof(InteractiveMusic)); if (music == null) Debug.LogWarning("An instance of InteractiveMusic cannot be found."); } }
void Start() { music = GetComponent<InteractiveMusic>(); }