Skip to content

Instantly share code, notes, and snippets.

@anchan828
Created May 26, 2012 13:03
Show Gist options
  • Save anchan828/2793861 to your computer and use it in GitHub Desktop.
Save anchan828/2793861 to your computer and use it in GitHub Desktop.
Vector2 v2;
void OnGUI ()
{
v2 = EditorGUILayout.Vector2Field ("", v2);
EditorGUIUtility.SetIconSize (v2);
Debug.Log (EditorGUIUtility.GetIconSize ());
tex = (Texture2D)EditorGUI.ObjectField (new Rect (0, 50, 100, 100), tex, typeof(Texture2D));
GUI.Label (new Rect (0, 150, 100, 30), EditorGUIUtility.ObjectContent (tex, typeof(Texture2D)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment