void OnGUI() { if (GUILayout.Button("Execute")) { CodeExecutionTime.Execute(() => { GetSum(total); }); } }
public override void OnInspectorGUI() { DrawDefaultInspector(); MeshGenerator mg = (MeshGenerator)target; if (GUILayout.Button("Create Mesh")) { t = CodeExecutionTime.Execute(() => { mg.CreateMesh(); }); } EditorGUILayout.HelpBox(string.Format("{0} \t axis segments\n" + "{1} \t height segments\n" + "{2} \t vertices\n" + "{3} \t triangles\n" + "{4:F2} \t ms", mg.Segment, mg.VerticalSegment, mg.Vertices, mg.Triangles, t), MessageType.Info); }