Beispiel #1
0
        private void DrawExportGUI()
        {
            string label = "Export";
            string id    = "export" + GetInstanceID();

            JEditorCommon.Foldout(label, true, id, () =>
            {
                CameraPosition  = JEditorCommon.InlineVector3Field("Position", CameraPosition);
                CameraNearPlane = EditorGUILayout.FloatField("Near Plane", CameraNearPlane);
                CameraFarPlane  = EditorGUILayout.FloatField("Far Plane", CameraFarPlane);
                CameraClearFlag = (CameraClearFlags)EditorGUILayout.EnumPopup("Clear Flags", CameraClearFlag);
                if (CameraClearFlag == CameraClearFlags.Color)
                {
                    CameraBackgroundColor = EditorGUILayout.ColorField("Background Color", CameraBackgroundColor);
                }

                Resolution         = EditorGUILayout.IntPopup("Resolution", Resolution, ResolutionLabels, ResolutionValues);
                ExportFaceTextures = EditorGUILayout.Toggle("Export Face Textures", ExportFaceTextures);

                string dir = Directory;
                JEditorCommon.BrowseFolder("Directory", ref dir);
                Directory = dir;

                GUI.enabled = !string.IsNullOrEmpty(Directory);
                if (GUILayout.Button("Export"))
                {
                    Export();
                }
                GUI.enabled = true;
            });
        }