Example #1
0
        protected override void OnMeshGUI(Mesh mesh, RenderDataList rdl)
        {
            StaticEditorFlags flags = 0;

            foreach (var item in rdl.dataList)
            {
                if (GF.GetStaticEditorFlags(item.renderer.gameObject, StaticEditorFlags.OccludeeStatic))
                {
                    flags |= StaticEditorFlags.OccludeeStatic;
                }

                if (GF.GetStaticEditorFlags(item.renderer.gameObject, StaticEditorFlags.OccluderStatic))
                {
                    flags |= StaticEditorFlags.OccluderStatic;
                }
            }

            string text = "无遮挡";

            if (flags == (StaticEditorFlags.OccluderStatic | StaticEditorFlags.OccludeeStatic))
            {
                text = "双遮";
            }
            else if (flags == StaticEditorFlags.OccludeeStatic)
            {
                text = "小物件";
            }
            else if (flags == StaticEditorFlags.OccluderStatic)
            {
                text = "大物件";
            }

            var text1 = GuiTools.StringPopup(false, text, Ollcusion_items, GUILayout.Width(120));

            if (text1 != text)
            {
                foreach (var item in rdl.dataList)
                {
                    SetStaticEditorFlags(item.renderer.gameObject, text1);
                }
            }
        }