Using Unityengine;
Using Unityeditor;
Using System.Collections;
public class TileCreator:UnityEditor.EditorWindow {
[MenuItem ("Tools/tilecreator")]
static void Create () {
Editorwindow.getwindow (typeof (Tilecreator));
}
int polysize,xcount,zcount;
String Tilename;
void Creatmesh ()
{
}
void Ongui ()
{
Guilayout.label ("Tile Creator", Editorstyles.boldlabel);
Tilename = Editorguilayout.textfield ("Tile Object Name", tilename);
Polysize = Editorguilayout.intslider ("Tile size", polysize,1,20);
Xcount = Editorguilayout.intslider ("x Tile Count", xcount,1,100);
Zcount = Editorguilayout.intslider ("Z Tile Count", zcount,1,100);
if (Guilayout.button ("Create Tile Object"))
{
Creatmesh ();
}
}
}
Finally can see, but do not know right, the book does not have int and string part, but there is no mistake, so unauthorized added, the book after the part of not know can carry on, do not wrong AH (cry), first save the Code (haha).