// Use this for initialization void Start() { dmx = dmxObject.GetComponent <DP.DMX>(); panArm = this.transform.Find("Pan").gameObject; tiltHead = panArm.transform.Find("Head").gameObject; }
void OnGUI () { dmxObject = GameObject.Find("DMXObject"); dmx = dmxObject.GetComponent<DP.DMX>(); //Levels scroll = EditorGUILayout.BeginScrollView(scroll); GUIStyle labelWidth = new GUIStyle(); labelWidth.fixedWidth = 300; for (int f = 1; f < dmx.nChannels+1; f++) { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("[Channel " + f + "] ", GUILayout.Width(100)); int i = EditorGUILayout.IntSlider(dmx[f], 0, 255, GUILayout.Width(300)); if (i != dmx[f]) { dmx[f] = (byte)i; } EditorGUILayout.EndHorizontal(); } EditorGUILayout.EndScrollView(); }
void OnGUI() { dmxObject = GameObject.Find("DMXObject"); dmx = dmxObject.GetComponent <DP.DMX>(); //Levels scroll = EditorGUILayout.BeginScrollView(scroll); GUIStyle labelWidth = new GUIStyle(); labelWidth.fixedWidth = 300; for (int f = 1; f < dmx.nChannels + 1; f++) { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("[Channel " + f + "] ", GUILayout.Width(100)); int i = EditorGUILayout.IntSlider(dmx[f], 0, 255, GUILayout.Width(300)); if (i != dmx[f]) { dmx[f] = (byte)i; } EditorGUILayout.EndHorizontal(); } EditorGUILayout.EndScrollView(); }
// Use this for initialization void Start() { dmxObject = GameObject.Find("DMXObject"); dmx = dmxObject.GetComponent <DP.DMX>(); }
// Use this for initialization void Start () { dmxObject = GameObject.Find("DMXObject"); dmx = dmxObject.GetComponent<DP.DMX>(); }