public void PlaceCurrentTileAtPosition(Vector3 position, Vector3 rotation) { if (GetCurrentTile()) { RuntimeEngine.ApplyBuild(GetCurrentTile(), position, "", "", rotation); } }
public void FinishUp(bool isCancel = false) { isItFirst = true; if (mDummy) { Destroy(mDummy); } if (newTiles.Count > 0) { if (!isCancel) { #if UNITY_EDITOR uteGLOBAL3dMapEditor.UndoSession = 1; #endif for (int i = 0; i < newTiles.Count; i++) { Tile tile = (Tile)newTiles[i]; #if UNITY_EDITOR if (uteMEE) { if (newTiles.Count == 1) { uteGLOBAL3dMapEditor.UndoSession = 2; } uteMEE.ApplyBuild(mTile, tile.pos, mName, mGuid, mTile.transform.localEulerAngles, "", true); if (i == newTiles.Count - 2) { uteGLOBAL3dMapEditor.UndoSession = 2; } } else { #endif uteMEER.ApplyBuild(mTile, tile.pos, mName, mGuid, mTile.transform.localEulerAngles, "", true); #if UNITY_EDITOR } #endif } } if (newTiles.Count > 0) { newTiles.Clear(); } if (dummyTrash.Count > 0) { for (int i = 0; i < dummyTrash.Count; i++) { GameObject go = (GameObject)dummyTrash[i]; Destroy(go); } dummyTrash.Clear(); } } isBuilding = false; }