TileBase 瓦片基类

class in UnityEngine.Tilemaps

/

Inherits from:ScriptableObject

/

Implemented in:UnityEngine.TilemapModule

UnityEngine.Tilemaps中的类

/

继承自:ScriptableObject

/

实现于:UnityEngine.TilemapModule

Description 描述

Base class for a tile in the Tilemap.

Inherit from this to implement your custom tile to be placed in a Tilemap component.

Tilemap中瓦片的基类。

从此继承以实现要放置在Tilemap组件中的自定义瓦片。

Public Methods 公共方法

获取瓦片动画数据 GetTileAnimationData 从脚本化的图块检索所有图块动画数据。 Retrieves any tile animation data from the scripted tile.
获取瓦片数据 GetTileData 从脚本化磁贴中检索所有磁贴渲染数据。 Retrieves any tile rendering 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.

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.

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 启动可编写脚本的对脚本时将调用此函数。 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.