示例#1
0
        void OnGUI()
        {
            if (Storage != null)
            {
                RenderShotInspector();
            }

            GUILayout.BeginHorizontal();
            Storage = (ShotObject)EditorGUILayout.ObjectField(Storage, typeof(ShotObject), allowSceneObjects: false);
            if (GUILayout.Button("PreWarm", GUILayout.Width(70)))
            {
                ShotManager.PreWarm(Storage);
            }
            GUILayout.EndHorizontal();

            if (Storage != null)
            {
                EditorUtility.SetDirty(Storage);
            }
        }
示例#2
0
        void OnGUI()
        {
            if (Storage != null)
            {
                RenderShotInspector();

                //Render new shot buttons
                GUILayout.BeginHorizontal();

                if (GUILayout.Button("New Shot"))
                {
                    Storage.shots.Add(new Shot("New Shot"));
                }

                if (GUILayout.Button("Capture Shot"))
                {
                    Shot shot = new Shot("New Shot");
                    RecordSceneCamera(shot);
                    RecordSelection(shot);
                    RecordTimeStamp(shot);
                    Storage.shots.Add(shot);
                }

                GUILayout.EndHorizontal();
            }

            GUILayout.BeginHorizontal();
            Storage = (ShotObject)EditorGUILayout.ObjectField(Storage, typeof(ShotObject), allowSceneObjects: false);

            if (GUILayout.Button("PreWarm", GUILayout.Width(70)))
            {
                ShotManager.PreWarm(Storage);
            }
            GUILayout.EndHorizontal();

            if (Storage != null)
            {
                EditorUtility.SetDirty(Storage);
            }
        }