示例#1
0
        //// TODO : INVESTIGATE TO ACCESS THOSE VARIABLES AS THE DEFAULT INSPECTOR IS UGLY
        //private SerializedProperty wrapModeProperty;
        //private SerializedProperty filterModeProperty;
        //private SerializedProperty anisotropyLevelProperty;
        #endregion

        #region Overriden base class functions (https://docs.unity3d.com/ScriptReference/Editor.html)
        /// <summary>
        /// Draws the content of the Inspector
        /// </summary>
        public override void OnInspectorGUI()
        {
            GuiHelpers.DrawHeader(Aura.ResourcesCollection.logoTexture);

            EditorGUILayout.Separator();

            EditorGUILayout.BeginVertical(GuiStyles.Background);
            GUILayout.Label(new GUIContent(" Texture3D Preview", Aura.ResourcesCollection.texture3DIconTexture), GuiStyles.LabelBoldCenteredBig);
            EditorGUILayout.EndVertical();

            //serializedObject.Update();

            //// HAD TO DISABLE THE DEFAULT INSPECTOR AS IT MADE PREVIEW LAG
            //DrawDefaultInspector();

            //serializedObject.ApplyModifiedProperties();
        }
示例#2
0
        /// <summary>
        /// Draws the main screen
        /// </summary>
        private static void DrawMainIntroductionScreen()
        {
            Rect drawnArea = new Rect(_margin, _margin, _size.x - _margin * 2, _size.y);

            //GUIStyle areaStyle = GuiStyles.ButtonNoHoverNoBorder;
            GUIStyle areaStyle = GuiStyles.Label;

            if (_mainIntroductionScreenId == 1)
            {
                drawnArea.y += 16;
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginVertical(areaStyle);
                GuiHelpers.DrawHeader(Aura.ResourcesCollection.mainIntroductionScreenTextures[0]);
                GUILayout.Label(new GUIContent("Thank you for buying Aura 2"), new GUIStyle(GuiStyles.LabelBoldCenteredBig)
                {
                    fontSize = 20
                });
                GUILayout.EndVertical();
                GUILayout.EndArea();

                drawnArea.y += 196;
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginVertical(areaStyle);
                GUILayout.Label(new GUIContent("Please read the provided documentation."), new GUIStyle(GuiStyles.LabelBold)
                {
                    fontSize = 15
                });
                EditorGUILayout.Separator();
                GUILayout.Label(new GUIContent("It explains the philosophy behind Aura 2 and contains detailed explanations about all options, components and parameters included in Aura 2."), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
                GUILayout.Label(new GUIContent("Click Next to continue."), new GUIStyle(GuiStyles.LabelBold)
                {
                    fontSize = 15
                });
                GUILayout.EndVertical();
                GUILayout.EndArea();
            }
            else if (_mainIntroductionScreenId == 2)
            {
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginVertical(areaStyle);
                GuiHelpers.DrawHeader(Aura.ResourcesCollection.logoTexture);
                GUILayout.Label(new GUIContent(" Aura Components"), new GUIStyle(GuiStyles.LabelBoldCenteredBig)
                {
                    fontSize = 17
                });
                GUILayout.EndVertical();
                GUILayout.EndArea();

                drawnArea.y += Aura.ResourcesCollection.logoTexture.height + 36;
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginVertical(areaStyle);
                GUILayout.Label(new GUIContent("Aura 2 operates using 3 types of Aura components applied to game objects : "), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                GUILayout.EndVertical();
                GUILayout.EndArea();

                drawnArea.y += 28;
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginHorizontal(areaStyle);
                GUILayout.BeginHorizontal(GUILayout.Width(Aura.ResourcesCollection.cameraUiIconTexture.width));
                GuiHelpers.DrawHeader(Aura.ResourcesCollection.cameraUiIconTexture);
                GUILayout.EndHorizontal();
                EditorGUILayout.Separator();
                GUILayout.BeginVertical();
                GUILayout.Space(10);
                GUILayout.Label(new GUIContent("<b>Aura Camera</b> components are in charge of collecting all the contributing data, processing the Aura system computation and displaying the volumetric lighting."), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                GUILayout.EndVertical();
                GUILayout.EndHorizontal();
                GUILayout.EndArea();

                drawnArea.y += 64;
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginHorizontal(areaStyle);
                GUILayout.BeginHorizontal(GUILayout.Width(Aura.ResourcesCollection.lightUiIconTexture.width));
                GuiHelpers.DrawHeader(Aura.ResourcesCollection.lightUiIconTexture);
                GUILayout.EndHorizontal();
                EditorGUILayout.Separator();
                GUILayout.BeginVertical();
                GUILayout.Space(10);
                GUILayout.Label(new GUIContent("<b>Aura Light</b> components are in charge of collecting the light's data/parameters and providing them to the Aura system."), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                GUILayout.EndVertical();
                GUILayout.EndHorizontal();
                GUILayout.EndArea();

                drawnArea.y += 64;
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginHorizontal(areaStyle);
                GUILayout.BeginHorizontal(GUILayout.Width(Aura.ResourcesCollection.volumeUiIconTexture.width));
                GuiHelpers.DrawHeader(Aura.ResourcesCollection.volumeUiIconTexture);
                GUILayout.EndHorizontal();
                EditorGUILayout.Separator();
                GUILayout.BeginVertical();
                GUILayout.Space(10);
                GUILayout.Label(new GUIContent("<b>Aura Volume</b> components are in charge of creating an injection volume, collecting its data/parameters and providing them to the Aura system."), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                GUILayout.EndVertical();
                GUILayout.EndHorizontal();
                GUILayout.EndArea();

                drawnArea.y += 64;
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginVertical(areaStyle);
                GUILayout.Label(new GUIContent("Aura components can be added/created using the <b>\"Add Component\"</b> button, the <b>\"Add Aura\"</b> button (on Cameras and Lights), the <b>\"GameObject -> Aura 2\"</b> menu or the Edition <b>Toolbox</b> integrated in the SceneView."), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                GUILayout.EndVertical();
                GUILayout.EndArea();
            }
            else if (_mainIntroductionScreenId == 3)
            {
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginVertical(areaStyle);
                GuiHelpers.DrawHeader(Aura.ResourcesCollection.logoTexture);
                GUILayout.Label(new GUIContent(" Edition Toolbox"), new GUIStyle(GuiStyles.LabelBoldCenteredBig)
                {
                    fontSize = 17
                });
                GUILayout.EndVertical();
                GUILayout.EndArea();

                drawnArea.y += Aura.ResourcesCollection.logoTexture.height + 36;
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginHorizontal(areaStyle);
                GUILayout.BeginHorizontal(GUILayout.Width(drawnArea.width / 5));
                GUILayout.Label(Aura.ResourcesCollection.mainIntroductionScreenTextures[1], GuiStyles.EmptyMiddleAligned);
                GUILayout.EndHorizontal();
                GUILayout.BeginVertical(areaStyle);
                GUILayout.Space(24);
                GUILayout.Label(new GUIContent("Aura 2 introduces an <b>Edition Toolbox</b> that contains shortcut buttons."), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                EditorGUILayout.Separator();
                GUILayout.Label(new GUIContent("These shortcuts allow to easily and quickly add or edit volumetric lighting into your scenes."), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                EditorGUILayout.Separator();
                GUILayout.Label(new GUIContent("The <b>SCENE</b> panel contains buttons to quickly add Aura components on the scene's game objects.\nIt also contains a <b>Display Presets</b> button that will let you choose and apply amongst several <b>Aura Ambience</b> presets."), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                EditorGUILayout.Separator();
                GUILayout.Label(new GUIContent("The <b>CREATE</b> panel contains buttons to quickly create Aura objects in the scene."), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                GUILayout.EndVertical();
                GUILayout.EndHorizontal();
                GUILayout.EndArea();
            }
            else if (_mainIntroductionScreenId == 4)
            {
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginVertical(areaStyle);
                GuiHelpers.DrawHeader(Aura.ResourcesCollection.logoTexture);
                GUILayout.Label(new GUIContent(" Aura Ambience Presets"), new GUIStyle(GuiStyles.LabelBoldCenteredBig)
                {
                    fontSize = 17
                });
                GUILayout.EndVertical();
                GUILayout.EndArea();

                drawnArea.y += Aura.ResourcesCollection.logoTexture.height + 62;
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginHorizontal(areaStyle);
                GUILayout.BeginHorizontal(GUILayout.Width(drawnArea.width / 2.5f));
                GUILayout.Label(Aura.ResourcesCollection.mainIntroductionScreenTextures[4], GuiStyles.EmptyMiddleAligned);
                GUILayout.EndHorizontal();
                GUILayout.BeginVertical(areaStyle);
                GUILayout.Space(24);
                GUILayout.Label(new GUIContent("The <b>Display Presets</b> button located in the <b>Toolbox</b> will open a panel containing several pre-established <b>Aura Ambiance</b> presets."), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                EditorGUILayout.Separator();
                GUILayout.Label(new GUIContent("In one click, you will be able to apply the desired <b>Aura Ambience</b> preset to your whole scene, giving you the perfect kickstart to integrate volumetric lighting into your project."), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                GUILayout.EndVertical();
                GUILayout.EndHorizontal();
                GUILayout.EndArea();
            }
            else if (_mainIntroductionScreenId == 5)
            {
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginVertical(areaStyle);
                GuiHelpers.DrawHeader(Aura.ResourcesCollection.logoTexture);
                GUILayout.Label(new GUIContent(" Aura Menu"), new GUIStyle(GuiStyles.LabelBoldCenteredBig)
                {
                    fontSize = 17
                });
                GUILayout.EndVertical();
                GUILayout.EndArea();

                drawnArea.y += Aura.ResourcesCollection.logoTexture.height + 48;
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginVertical(areaStyle);
                GUILayout.Label(new GUIContent("The <b>Aura 2 menu</b> can be found in \"Window -> Aura 2\"."), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
                GUILayout.Label(Aura.ResourcesCollection.mainIntroductionScreenTextures[2], GuiStyles.EmptyMiddleAligned);
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
                GUILayout.Label(new GUIContent("This menu contains access to the <b>Aura Edition Settings</b> as well as other useful tools such as the <b>Texture3D Tool</b>."), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                GUILayout.EndVertical();
                GUILayout.EndArea();
            }
            else if (_mainIntroductionScreenId == 6)
            {
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginVertical(areaStyle);
                GuiHelpers.DrawHeader(Aura.ResourcesCollection.logoTexture);
                GUILayout.Label(new GUIContent(" Aura Edition Settings"), new GUIStyle(GuiStyles.LabelBoldCenteredBig)
                {
                    fontSize = 17
                });
                GUILayout.EndVertical();
                GUILayout.EndArea();

                drawnArea.y += Aura.ResourcesCollection.logoTexture.height + 36;
                GUILayout.BeginArea(drawnArea);
                GUILayout.BeginHorizontal(areaStyle);
                GUILayout.BeginHorizontal(GUILayout.Width(drawnArea.width / 2));
                GUILayout.Label(Aura.ResourcesCollection.mainIntroductionScreenTextures[3], GuiStyles.EmptyMiddleAligned);
                GUILayout.EndHorizontal();
                GUILayout.BeginVertical(areaStyle);
                GUILayout.Space(56);
                GUILayout.Label(new GUIContent("The <b>Aura Edition Settings</b> window contains settings related to the edition environment."), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                EditorGUILayout.Separator();
                GUILayout.Label(new GUIContent("Settings such as <b>SceneView Toolbox</b> parameters and <b>SceneView Visualization</b> quality settings can be found there."), new GUIStyle(GuiStyles.Label)
                {
                    fontSize = 15
                });
                GUILayout.EndVertical();
                GUILayout.EndHorizontal();
                GUILayout.EndArea();
            }

            Rect buttonsArea = new Rect(_size.x - _margin - 200, _size.y - _margin - 32, 64, 32);

            if (_mainIntroductionScreenId < 6)
            {
                GUILayout.BeginArea(buttonsArea);
                GUILayout.BeginHorizontal();
                if (GUILayout.Button("Close", GuiStyles.Button, GUILayout.Width(64), GUILayout.Height(32)))
                {
                    _mainIntroductionScreenId = 0;
                }
                GUILayout.EndHorizontal();
                GUILayout.EndArea();
            }

            buttonsArea.x      += 64 + 8;
            buttonsArea.width   = 128;
            buttonsArea.y      -= 8;
            buttonsArea.height += 8;
            GUILayout.BeginArea(buttonsArea);
            GUILayout.BeginHorizontal();
            if (GUILayout.Button(_mainIntroductionScreenId == 6 ? "Close" : "Next", new GUIStyle(GuiStyles.ButtonBold)
            {
                fontSize = 17
            }, GUILayout.Width(128), GUILayout.Height(40)))
            {
                ++_mainIntroductionScreenId;
                _mainIntroductionScreenId %= 7;
            }
            GUILayout.EndHorizontal();
            GUILayout.EndArea();

            if (_mainIntroductionScreenId > 1)
            {
                buttonsArea.x = _margin;
                GUILayout.BeginArea(buttonsArea);
                GUILayout.BeginHorizontal();
                if (GUILayout.Button("Previous", new GUIStyle(GuiStyles.ButtonBold)
                {
                    fontSize = 17
                }, GUILayout.Width(128), GUILayout.Height(40)))
                {
                    --_mainIntroductionScreenId;
                }
                GUILayout.EndHorizontal();
                GUILayout.EndArea();
            }
        }