コード例 #1
0
 public override void OnInspectorGUI()
 {
     myCombine = (CombineMeshes)target;
     DrawDefaultInspector();
     if (myCombine.myMeshFilter.sharedMesh == null)
     {
         if (GUILayout.Button("Combine Meshes"))
         {
             myCombine.EnableMeshNewCollider();
         }
     }
     if (myCombine.myMeshFilter.sharedMesh != null)
     {
         if (GUILayout.Button("Save As Prefab (DESTRUCTIVE)"))
         {
             SaveMeshData(true);
         }
         if (GUILayout.Button("Save As Prefab (Non-Destructive)"))
         {
             SaveMeshData(false);
         }
         if (GUILayout.Button("Disable Meshes"))
         {
             myCombine.DisableMesh();
             EditorGUIUtility.ExitGUI();
         }
     }
 }
コード例 #2
0
 public void OnEnable()
 {
     myCombine = (CombineMeshes)target;
     myCombine.Start();
 }