// Use this for initialization public void Awake() { if( lowerBand >= VJManager.numberOfBands ) { Debug.LogWarning("[FATAL]lowerBand too large."); lowerBand = VJManager.numberOfBands-1; } if( upperBand >= VJManager.numberOfBands ) { Debug.LogWarning("[FATAL]lowerBand too large."); upperBand = VJManager.numberOfBands-1; } if( upperBand < lowerBand ) { Debug.LogWarning("upperBand can not be lower than lowerBand."); upperBand = lowerBand; } m_manager = GetComponent<VJManager>(); }
public override void OnInspectorGUI() { GUI.changed = false; base.OnInspectorGUI(); VJManager manager = target as VJManager; bool b = EditorGUILayout.Toggle("Use Microphone", manager.isMicSource); if (b != manager.isMicSource) { manager.ToogleMicSource(b); } if (GUI.changed) { EditorUtility.SetDirty(target); } }
// Use this for initialization public void Awake() { if (lowerBand >= VJManager.numberOfBands) { Debug.LogWarning("[FATAL]lowerBand too large."); lowerBand = VJManager.numberOfBands - 1; } if (upperBand >= VJManager.numberOfBands) { Debug.LogWarning("[FATAL]lowerBand too large."); upperBand = VJManager.numberOfBands - 1; } if (upperBand < lowerBand) { Debug.LogWarning("upperBand can not be lower than lowerBand."); upperBand = lowerBand; } m_manager = GetComponent <VJManager>(); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); serializedObject.Update(); bool b = EditorGUILayout.Toggle("Use Microphone", isMicSourceProperty.boolValue); if (serializedObject.isEditingMultipleObjects) { foreach (UnityEngine.Object o in targets) { VJManager m = o as VJManager; if (GUI.changed) { if (m.isMicSource != b) { m.ToogleMicSource(b); } } } } else { VJManager m = target as VJManager; if (GUI.changed) { if (m.isMicSource != b) { m.ToogleMicSource(b); } } } serializedObject.ApplyModifiedProperties(); }
// Use this for initialization public void Awake() { m_manager = GetComponent <VJManager>(); }
// Use this for initialization public void Awake() { m_manager = GetComponent<VJManager>(); }