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();
}
}
}
时间: 2024-12-27 18:39:43