// Start is called before the first frame update void Start() { gridWidth = 10; gridHeight = 5; cellSize = 1f; mapOriginPosition = new Vector3(0, 0, 0); // set origin float textureSelectPanelOffset = 1; tileMapEditor = this.gameObject.GetComponent <MyTileMapEditor>(); tileMapEditor.init(gridWidth, gridHeight, cellSize, mapOriginPosition, textureSelectPanelOffset); }
// Start is called before the first frame update void Start() { gridWidth = 15; gridHeight = 8; cellSize = 1f; mapOriginPosition = new Vector3(0, 0, 0); // set origin float textureSelectPanelOffset = 1; tileMapEditor = this.gameObject.GetComponent <MyTileMapEditor>(); tileMapEditor.init(gridWidth, gridHeight, cellSize, mapOriginPosition, textureSelectPanelOffset); //Camera.main.transform.position = mapOriginPosition + new Vector3((gridWidth * cellSize) / 2 + textureSelectPanelOffset, (gridHeight * cellSize) / 2, -10); }