예제 #1
0
        public override bool Inspect()
        {
            var changed = false;

            var rtp = PainterCamera.Inst;

            if ("Modules".enter(ref inspectedItems, 10, false).nl_ifNotEntered() && rtp.ModulsInspect().nl(ref changed))
            {
                rtp.SetToDirty();
            }

            if ("Lists".enter(ref inspectedItems, 11).nl(ref changed))
            {
                InspectLists().changes(ref changed);
            }

            if ("Painter Camera".enter(ref inspectedItems, 14).nl_ifNotEntered())
            {
                PainterCamera.Inst.DependenciesInspect(true);
            }

            if ("Depth Projector Camera".enter(ref inspectedItems, 15).nl())
            {
                if (DepthProjectorCamera.Instance)
                {
                    DepthProjectorCamera.Instance.Nested_Inspect().nl();
                }
                else if ("Instantiate".Click())
                {
                    PainterCamera.GetOrCreateProjectorCamera();
                }
            }

            if ("Inspector & Debug".enter(ref inspectedItems, 16).nl())
            {
                QcUtils.InspectInspector();
            }

            if (inspectedItems == -1)
            {
                if ("Painter Data Encode / Decode Test".Click().nl())
                {
                    this.SaveCfgData();

                    matMetas.Clear();

                    this.LoadCfgData();
                }

                #if UNITY_EDITOR
                if ("Enable PlayTime UI".toggleIcon(ref enablePainterUIonPlay).nl())
                {
                    MeshEditorManager.Inst.StopEditingMesh();
                }

                "Hide documentation".toggleIcon(ref hideDocumentation).changes(ref changed);
                MsgPainter.aboutDisableDocumentation.DocumentationClick();
                pegi.nl();

                "Teaching Notifications".toggleIcon("Will show some notifications on the screen", ref showTeachingNotifications).nl();

                "Where to save content".nl(PEGI_Styles.ListLabel);

                "Textures".edit(60, ref texturesFolderName).nl();

                "Atlases: {0}/".F(texturesFolderName).edit(120, ref atlasFolderName).nl();

                "Materials".edit(60, ref materialsFolderName).nl();

                "Meshes".edit(60, ref meshesFolderName).nl();

                if (icon.Discord.Click("Join Discord", 64))
                {
                    PlaytimePainter.Open_Discord();
                }

                if (icon.Docs.Click("Open Asset Documentation", 64))
                {
                    PlaytimePainter.OpenWWW_Documentation();
                }

                if (icon.Email.Click("Report a bug / send suggestion / ask question.", 64))
                {
                    PlaytimePainter.Open_Email();
                }

                pegi.nl();

                LazyLocalization.LanguageSelection().nl();
                #endif
            }

            base.Inspect().nl(ref changed);

            return(changed);
        }
예제 #2
0
        public override bool Inspect()
        {
            pegi.toggleDefaultInspector(this).nl();

            var changed = false;

            if ("Camera Modules".enter(ref _inspectedStuff, 0, false).nl_ifNotEntered())
            {
                _modulesMeta.edit_List(ref CameraModuleBase.modules, CameraModuleBase.all).changes(ref changed);

                if (!_modulesMeta.Inspecting)
                {
                    if ("Find Modules".Click())
                    {
                        CameraModuleBase.RefreshModules();
                    }

                    if ("Delete Modules".Click().nl())
                    {
                        CameraModuleBase.modules = null;
                    }
                }

                pegi.nl();
            }

            if ("Depth Projector Camera".enter(ref _inspectedStuff, 1).nl())
            {
                if (DepthProjectorCamera.Instance)
                {
                    DepthProjectorCamera.Instance.Nested_Inspect().nl();
                }
                else if ("Instantiate".Click())
                {
                    GetOrCreateProjectorCamera();
                }
            }

            if ("Painter Camera".enter(ref _inspectedStuff, 2).nl_ifNotEntered())
            {
                DependenciesInspect(true);
            }

            if ("Data && Config".enter(ref _inspectedStuff, 3).nl_ifEntered())
            {
                if (Data)
                {
                    Data.Nested_Inspect().nl(ref changed);
                }
                else
                {
                    "NO CONFIG Scriptable Object".writeWarning();
                    pegi.nl();
                    DependenciesInspect(true);
                }
            }

            if (_inspectedStuff == -1 && Data)
            {
                Data.ClickHighlight();
            }

            pegi.nl();

            if ("Inspector & Debug".enter(ref _inspectedStuff, 4).nl())
            {
                QcUtils.InspectInspector();
            }


            pegi.nl();



            return(changed);
        }