Skip to content

Instantly share code, notes, and snippets.

@anchan828
Created June 9, 2012 16:44
Show Gist options
  • Save anchan828/2901715 to your computer and use it in GitHub Desktop.
Save anchan828/2901715 to your computer and use it in GitHub Desktop.
private Rect rect1, rect2;
private bool stats, gizmos, on;
void OnGUI (){
on = EditorGUILayout.Toggle (on);
rect1 = EditorGUILayout.RectField (rect1);
rect2 = new Rect (0, 22, position.width, position.height);
stats = EditorGUILayout.Toggle ("stats :", stats);
gizmos = EditorGUILayout.Toggle ("gizmos :", gizmos);
if (on)
EditorGUIUtility.RenderGameViewCameras (rect1, rect2, stats, gizmos);
this.Repaint ();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment