Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 void OnDisable()
 {
     artnet.Close();
     SaveDataMap();
     if (dMX != null)
     {
         dMX.Quit();
         dMX = null;
     }
 }