void OnSceneGUI() { mesh = target as MeshStudy; //Debug.Log("Custom editor is running"); EditMesh(); }
public override void OnInspectorGUI() { DrawDefaultInspector(); mesh = target as MeshStudy; // For testing Reset function if (mesh.isCloned) { if (GUILayout.Button("Test Edit")) { mesh.EditMesh(); } } }
public override void OnInspectorGUI() { DrawDefaultInspector(); mesh = target as MeshStudy; if (GUILayout.Button("Reset")) { mesh.Reset(); } if (mesh.isCloned) { if (GUILayout.Button("Test Edit")) { mesh.EditMesh(); } } }
public override void OnInspectorGUI() { DrawDefaultInspector(); mesh = target as MeshStudy; if (GUILayout.Button("Reset")) // 1. Code draws a Reset button in Inspector { mesh.Reset(); // 2. When prssed, calls Reset() function in MeshStudy.cs } // For testing Reset function if (mesh.isCloned) { if (GUILayout.Button("Test Edit")) { mesh.EditMesh(); } } }
public override void OnInspectorGUI() { DrawDefaultInspector(); mesh = target as MeshStudy; if (GUILayout.Button("Reset")) //1 { mesh.Reset(); //2 } //MODIFIED: an error was showing up, so I had to add the exceptiong for a SkinnedMeshRenderer component. // For testing Reset function //if (mesh.isCloned) //{ // if (GUILayout.Button("Test Edit")) // { // mesh.EditMesh(); // } //} }
public override void OnInspectorGUI() { DrawDefaultInspector(); mesh = target as MeshStudy; if (GUILayout.Button("Reset")) //1 { mesh.Reset(); //2 } // For testing Reset function if (mesh.isCloned) { if (GUILayout.Button("Test Edit")) { mesh = target as MeshStudy; Debug.Log("Custom editor is running"); mesh.EditMesh(); } } }
void OnSceneGUI() { mesh = target as MeshStudy; EditMesh(); }
public void setReference(MeshStudy me, int verticee) { this.meshStudy = me; this.vertindex = verticee; }