Tile 瓦片

class in UnityEngine.Tilemaps

/

Inherits from:Tilemaps.TileBase

/

Implemented in:UnityEngine.TilemapModule

UnityEngine.Tilemaps中的类

/

继承自:Tilemaps.TileBase

/

实现于:UnityEngine.TilemapModule

Description 描述

Class for a default tile in the Tilemap.

This inherits from TileBase and represents a default tile to be placed in a Tilemap. It implements TileBase.GetTileData for simple rendering of a Sprite in the tile map.

Tilemap中默认瓦片的类。

这是从TileBase继承的,代表要放置在Tilemap中的默认tile 。它实现了 TileBase.GetTileData方法,用于在瓦片地图中简易的渲染Sprite

Properties

颜色 color Tile的颜色 Color of the Tile.
标志 flags Tile的TileFlags TileFlags of the Tile.
游戏对象 gameObject Tile的游戏对象 GameObject of the Tile.
精灵 sprite 要在Tile上渲染的sprite Sprite to be rendered at the Tile.
变换 transform Tile的变换矩阵 Transform matrix of the Tile.

Public Methods 公开方法

获取瓦片数据 GetTileData 检索Tile的瓦片渲染数据(不知道为什么说检索) Retrieves the tile rendering data for the Tile.

Inherited Members 继承成员

Properties

隐藏标志 hideFlags 该对象是否应该隐藏,随场景保存或可由用户修改? Should the object be hidden, saved with the Scene or modifiable by the user?
名字 name 对象的名字 The name of the object.

Public Methods 公开方法

获取实例ID GetInstanceID 返回对象的实例ID Returns the instance id of the object.
返回字符串 ToString 返回对象的名称。 Returns the name of the object.
获取瓦片动画数据 GetTileAnimationData 从脚本化的瓦片中检索所有瓦片动画数据 Retrieves any tile animation data from the scripted tile.
刷新瓦片 RefreshTile 刷新瓦片时将调用此方法 This method is called when the tile is refreshed.
启动 StartUp 在正在运行的场景的第一帧上调用启动 StartUp is called on the first frame of the running Scene.

Static Methods 静态方法

销毁 Destroy 移除GameObject,组件或资源 Removes a GameObject, component or asset.
立即销毁 DestroyImmediate 立即销毁对象obj。强烈建议您改用销毁 Destroys the object obj immediately. You are strongly recommended to use Destroy instead.
不要在加载时销毁 DontDestroyOnLoad 加载新场景时,请勿破坏目标对象 Do not destroy the target Object when loading a new Scene.
查找对象类型 FindObjectOfType 返回第一个Type类型的活动加载对象 Returns the first active loaded object of Type type.
查找对象类型 FindObjectsOfType 返回所有类型为Type的活动加载对象的列表 Returns a list of all active loaded objects of Type type.
实例化 Instantiate 克隆对象原始对象并返回克隆 Clones the object original and returns the clone.
创建实例 CreateInstance 创建可编写脚本对象的实例 Creates an instance of a scriptable object.

Operators 运算符

布尔 bool 该对象是否存在? Does the object exist?
运算符 operator != 比较两个对象是否引用了另一个对象 Compares if two objects refer to a different object.
运算符 operator == 比较两个对象引用以查看它们是否引用相同的对象 Compares two object references to see if they refer to the same object.

Messages 消息

唤醒时 Awake 启动ScriptableObject脚本时将调用此函数 This function is called when the ScriptableObject script is started.
销毁时 OnDestroy 当可编写脚本的对象将被销毁时,将调用此函数 This function is called when the scriptable object will be destroyed.
禁用时 OnDisable 当可编写脚本的对象超出范围时,将调用此函数 This function is called when the scriptable object goes out of scope.
启用时 OnEnable 加载对象时调用此函数 This function is called when the object is loaded.