|
|
|
|
|
|
|
|
|
|
void OnGUI() |
|
|
|
{ |
|
|
|
EditorGUILayout.LabelField(textureLabel, null); |
|
|
|
EditorGUILayout.LabelField(textureLabel); |
|
|
|
tileSize = EditorGUILayout.IntField(tileSizeLabel, tileSize, null); |
|
|
|
tileSize = EditorGUILayout.IntField(tileSizeLabel, tileSize); |
|
|
|
|
|
|
|
bool validData = (sourceTexture != null && IsTileSizeValid()); |
|
|
|
bool create = false; |
|
|
|
|
|
|
|
|
|
|
using (new EditorGUI.DisabledScope(!validData)) |
|
|
|
{ |
|
|
|
create = GUILayout.Button(createLabel, null); |
|
|
|
create = GUILayout.Button(createLabel); |
|
|
|
} |
|
|
|
|
|
|
|
if (create) |
|
|
|