Search Unity

Help with Editor GUI

Discussion in 'Scripting' started by x10z, Jan 6, 2011.

  1. x10z

    x10z

    Joined:
    Aug 18, 2009
    Posts:
    54
    Hello there again!!

    After one year and a half of Unity , I started to play with Editor GUI. Im confused though.

    I wanted to make a UV tool for planes , where I could edit the UVs of this planes in editor , instead of doing it in an Awake function when the game starts or something. I have the code for the UV part of the tool, but I would like to have something like , I would click once in a GameObject in the scene , would go to GameObject/MyUvTool and a pop up would be displayed with a Rectfield , where I would set x , y , width and Height and when I clicked OK , the Mesh UVs would be changed.

    How Can I do this ? I have no idea how to make the window, with the rect field and Ok button , then how to grab the values that user enters in the rectfield to the original script that calls the window, and so on.

    I'm truly lost...! HELP!!! hehehe

    Thanks in Advance guys
     
  2. trooper

    trooper

    Joined:
    Aug 21, 2009
    Posts:
    748