标签:image class window org tools get unity styles tool
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();
}
}
}
终于可以看到了,可是不知道对不对,书上没int和string的部分,可是没有就有错,所以擅自加上了,书之后的部分不知能不能进行下去,不要错啊(哭),先存下代码(哈哈)。
标签:image class window org tools get unity styles tool
原文地址:http://www.cnblogs.com/jj-wbsds-n/p/6035899.html