public static void CreateWizard(ProjectorManager projectorManager) { if (s_instance != null) { s_instance.Close(); } EasySetupWizard window = ScriptableObject.CreateInstance <EasySetupWizard>(); window.title = "Easy Setup Wizard of Projector Manager"; window.maxSize = window.minSize = WINDOW_SIZE; window.Initialize(projectorManager); window.ShowUtility(); s_instance = window; }
public override void OnInspectorGUI() { ProjectorManager manager = target as ProjectorManager; if (GUILayout.Button("Easy Setup Wizard")) { EasySetupWizard.CreateWizard(manager); } s_bShowReceivers = EditorGUILayout.Foldout(s_bShowReceivers, "Shadow Receivers"); if (s_bShowReceivers) { ++EditorGUI.indentLevel; EditorGUILayout.PropertyField(serializedObject.FindProperty("m_receiverLayerMask")); EditorGUILayout.PropertyField(serializedObject.FindProperty("m_receivers"), true); --EditorGUI.indentLevel; } s_bShowProjectorControls = EditorGUILayout.Foldout(s_bShowProjectorControls, "Projector Controls"); if (s_bShowProjectorControls) { ++EditorGUI.indentLevel; EditorGUILayout.PropertyField(serializedObject.FindProperty("m_mainCamera")); EditorGUILayout.PropertyField(serializedObject.FindProperty("m_environmentLayers")); EditorGUILayout.PropertyField(serializedObject.FindProperty("m_projectorFadeoutDistance")); EditorGUILayout.PropertyField(serializedObject.FindProperty("m_fadeDuration")); --EditorGUI.indentLevel; } s_bShowPlaneShadows = EditorGUILayout.Foldout(s_bShowPlaneShadows, "Plane Shadows"); if (s_bShowPlaneShadows) { ++EditorGUI.indentLevel; EditorGUILayout.PropertyField(serializedObject.FindProperty("m_raycastPlaneMask")); EditorGUILayout.PropertyField(serializedObject.FindProperty("m_useInfinitePlane")); if (manager.useInfinitPlane) { EditorGUILayout.PropertyField(serializedObject.FindProperty("m_infinitePlaneTransform")); EditorGUILayout.PropertyField(serializedObject.FindProperty("m_infinitePlaneNormal")); EditorGUILayout.PropertyField(serializedObject.FindProperty("m_infinitePlaneHeight")); } --EditorGUI.indentLevel; } s_bShowPlaneShadowTextures = EditorGUILayout.Foldout(s_bShowPlaneShadowTextures, "Plane Shadow Textures"); if (s_bShowPlaneShadowTextures) { ++EditorGUI.indentLevel; EditorGUILayout.PropertyField(serializedObject.FindProperty("m_blobShadowTextures"), true); if (manager.blobShadowTextures != null && 1 < manager.blobShadowTextures.Length) { EditorGUILayout.PropertyField(serializedObject.FindProperty("m_packedBlobShadowTexture")); EditorGUILayout.PropertyField(serializedObject.FindProperty("m_blobShadowTextureRects"), true); EditorGUILayout.PropertyField(serializedObject.FindProperty("m_packedTexturePadding")); EditorGUILayout.PropertyField(serializedObject.FindProperty("m_packedTextureMaxSize")); if (GUILayout.Button("Pack Blob Shadow Textures")) { PackBlobShadowTextures(manager, serializedObject); } } EditorGUILayout.PropertyField(serializedObject.FindProperty("m_shadowTexName")); --EditorGUI.indentLevel; } EditorGUILayout.PropertyField(serializedObject.FindProperty("m_manualUpdate")); serializedObject.ApplyModifiedProperties(); }