SwapTile(TileBase, TileBase)
Swaps all existing Tile s of changeTile to newTile and refreshes all the swapped Tile s.
읽는 시간 1분최근 업데이트: 한 달 전
Definition
- Type: Method
- Namespace: UnityEngine.Tilemaps
- Assembly: UnityEngine.TilemapModule
public void SwapTile(TileBase changeTile, TileBase newTile)
Parameters
Remarks
Refer to Scriptable Tiles and Tilemap for more information.
Examples
// Change all occurences of tileA into tileBusing UnityEngine;using UnityEngine.Tilemaps;public class ExampleClass : MonoBehaviour{ public TileBase tileA; public TileBase tileB; void Start() { Tilemap tilemap = GetComponent<Tilemap>(); tilemap.SwapTile(tileA, tileB); }}