Esempio n. 1
0
        public bool Inspect()
        {
            var changed = pegi.toggleDefaultInspector(this);

            pegi.nl();

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

            if (inspectedItems == -1)
            {
                if (!cfgLoaded)
                {
                    if ("Initialize Object (Load Cfg)".Click())
                    {
                        Decode(stdData);
                    }
                }
                else
                if ("Painter Data Encode / Decode Test".Click())
                {
                    stdData = Encode().CfgData;
                    //this.SaveCfgData();

                    matMetas.Clear();

                    Decode(stdData);
                    //this.LoadCfgData();
                }

                pegi.nl();

                if ("Don't Build with Painter Shaders".toggleIcon(ref dontIncludeShaderInBuild).nl())
                {
                    CheckShaders(forceReload: true);
                }

                #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();

                "Default for New Material".edit(ref defaultMaterial).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
            }

            return(changed);
        }
Esempio n. 2
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);
        }