void OnGUI() { EditorGUILayout.Space(); m.OnGUI(); EditorGUILayout.Space(); if(GUILayout.Button("roll")) { m.Roll(); } }
void OnGUI() { EditorGUILayout.Space(); m.OnGUI(); EditorGUILayout.Space(); if(GUILayout.Button("roll")) { m.Roll(); } if(GUI.changed) { EditorUtility.SetDirty(m); } }