コード例 #1
0
    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();
        }
    }
コード例 #2
0
    void Start()
    {
        GenRef = GetComponent <TileMapGen>();

        print(IsSurrounded("Layer 0", new Vector3Int(0, 0, 0)));
    }
コード例 #3
0
 public void OnEnable()
 {
     Gen        = (TileMapGen)target;
     labelStyle = new GUIStyle();
 }