Exemplo n.º 1
0
 static void OnMenuItemClick()
 {
     VolumeRenderedObject[] objects = GameObject.FindObjectsOfType <VolumeRenderedObject>();
     if (objects.Length == 1)
     {
         VolumeObjectFactory.SpawnCrossSectionPlane(objects[0]);
     }
     else
     {
         CrossSectionPlaneEditorWindow wnd = new CrossSectionPlaneEditorWindow();
         wnd.Show();
     }
 }
Exemplo n.º 2
0
 private void OnGUI()
 {
     VolumeRenderedObject[] spawnedObjects = GameObject.FindObjectsOfType <VolumeRenderedObject>();
     if (spawnedObjects.Length == 0)
     {
         EditorGUILayout.LabelField("Please load a dataset first.");
     }
     else
     {
         foreach (VolumeRenderedObject volobj in spawnedObjects)
         {
             if (GUILayout.Button(volobj.gameObject.name))
             {
                 VolumeObjectFactory.SpawnCrossSectionPlane(volobj);
             }
         }
     }
 }