public override void OnInspectorGUI() { TileMapGen tile = (TileMapGen)target; if (DrawDefaultInspector()) { if (tile.autoUpdate) { tile.DestroyChildren(); tile.GenerateMap(); } } if (GUILayout.Button("Generate")) { tile.DestroyChildren(); tile.GenerateMap(); } }
void Start() { GenRef = GetComponent <TileMapGen>(); print(IsSurrounded("Layer 0", new Vector3Int(0, 0, 0))); }
public void OnEnable() { Gen = (TileMapGen)target; labelStyle = new GUIStyle(); }