示例#1
0
        void Section_Camera()
        {
            if (tools.ShowSection("Main Camera", ref manager.showMainCamera))
            {
                if (manager.mainCamera == null)
                {
                    manager.FindMainCamera();
                }

                tools.StartEdit(manager, "Changed Main Camera Settings");

                tools.CameraOption("", ref manager.mainCamera);

                if (tools.Button("Set Optimum Camera Settings"))
                {
                    Camera cam = manager.FindMainCamera();
                    cam.hdr           = settings.optimumCamera_enableHDR;
                    cam.renderingPath = settings.optimumCamera_renderingPath;
                    tools.Message("Optimum Camera Settings", "All options set!");
                }

                if (settings != null)
                {
                    tools.BoolOption("Always Optimise", ref settings.enableAlwaysSetOptimumCamera);
                    if (tools.ShowSection("Optimum Settings", ref settings.showSection_optimumCameraSettings))
                    {
                        settings.optimumCamera_renderingPath = (RenderingPath)tools.EnumOption("Rendering Path", settings.optimumCamera_renderingPath);
                        tools.BoolOption("Enable HDR", ref settings.optimumCamera_enableHDR);
                        if (!settings.IsDefault_OptimumCamera())
                        {
                            if (tools.Button("Restore Default Optimum Settings"))
                            {
                                settings.SetDefault_OptimumCamera();
                            }
                        }
                        tools.EndSection();
                    }
                }

                tools.FinishEdit(manager);

                tools.EndSection();
            }
        }