void DrawHeader() { GUILayout.BeginArea(header); activeUniverse = GUILayout.SelectionGrid(activeUniverse, universes, 8); EditorGUILayout.BeginHorizontal(); bool setAsDmx = EditorGUILayout.Toggle("DMX out universe", dmxUniverse == activeUniverse, GUILayout.Width(200)); if (setAsDmx) { dmxUniverse = activeUniverse; sendDMX = EditorGUILayout.Toggle("serial DMX", sendDMX); if (sendDMX && dMX == null) { dMX = new DMX(); } } else { receiveArtNet[activeUniverse] = EditorGUILayout.Toggle("receive ArtNet", receiveArtNet[activeUniverse]); if (GUILayout.Button("Update")) { CallUpdate(); } } EditorGUILayout.EndHorizontal(); GUILayout.EndArea(); }
void OnDisable() { artnet.Close(); SaveDataMap(); if (dMX != null) { dMX.Quit(); dMX = null; } }