Ejemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            if (GUILayout.Button("XY_Quad"))
            {
                if (obj)
                {
                    obj.gameObject.GetComponent <MeshFilter>().mesh = MeshUp.CreateMeshXY(0.5f, 0.5f);
                }
            }
            if (GUILayout.Button("YZ_Quad"))
            {
                if (obj)
                {
                    obj.gameObject.GetComponent <MeshFilter>().mesh = MeshUp.CreateMeshYZ(0.5f, 0.5f);
                }
            }
            if (GUILayout.Button("XZ_Quad"))
            {
                if (obj)
                {
                    obj.gameObject.GetComponent <MeshFilter>().mesh = MeshUp.CreateMeshXZ(0.5f, 0.5f);
                }
            }
            if (GUILayout.Button("Union_Quad"))
            {
                if (obj)
                {
                    // obj.gameObject.GetComponent<MeshFilter>().mesh = MeshUp.CreateMeshYZ(0.5f, 0.5f);
                }
            }


            if (GUILayout.Button("To Prefab"))
            {
                if (obj)
                {
                    obj.Prefab();
                }
            }
        }
Ejemplo n.º 2
0
 void OnSceneGUI()
 {
     obj = (MeshUp)target;
 }