Tile

class in UnityEngine.Tilemaps

/

Inherits from:Tilemaps.TileBase

Switch to Manual

Description

Tilemap 中默认瓦片的类。

该类从 TileBase 继承,代表将放置在 Tilemap 中的默认瓦片。它实现 TileBase.GetTileData,以在瓦片地图中简单渲染 Sprite

Variables

color Tile 的 Color。
flags Tile 的 TileFlags。
gameObject Tile 的 GameObject。
sprite要在 Tile 处渲染的 Sprite。
transform Tile 的 Transform matrix。

Public Functions

GetTileData检索 Tile 的瓦片渲染数据。

Inherited members

Variables

hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
name对象的名称。

Public Functions

GetInstanceID返回对象的实例 ID。
ToString返回 GameObject 的名称。
GetTileAnimationData从脚本化瓦片中检索任何瓦片动画数据。
RefreshTile当瓦片刷新时调用此方法。
StartUpStartUp is called on the first frame of the running Scene.

Static Functions

Destroy删除 GameObject、组件或资源。
DestroyImmediate立即销毁对象 /obj/。强烈建议您改用 Destroy。
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfType返回第一个类型为 type 的已加载的激活对象。
FindObjectsOfType返回所有类型为 type 的已加载的激活对象的列表。
Instantiate克隆 original 对象并返回克隆对象。
CreateInstance创建脚本化对象的实例。

Operators

bool该对象是否存在?
operator !=比较两个对象是否引用不同的对象。
operator ==比较两个对象引用,判断它们是否引用同一个对象。

Messages

Awake当 ScriptableObject 脚本启动时调用此函数。
OnDestroy当脚本化对象将销毁时调用此函数。
OnDisable当脚本化对象超出范围时调用此函数。
OnEnable当对象加载时调用此函数。