TilemapRenderer 瓦片地图渲染器

class in UnityEngine.Tilemaps

/

Inherits from:Renderer

/

Implemented in:UnityEngine.TilemapModule

UnityEngine.Tilemaps中的类

/

继承自:Renderer

/

实现于:UnityEngine.TilemapModule

Description 描述

The tile map renderer is used to render the tile map marked out by a tile map component and a grid component.

This class is a script interface for a tile map renderer component.

瓦片地图渲染器用于渲染由tile map组件和grid组件标记的瓦片地图。

此类是tile map renderer组件的脚本接口。

Properties 属性

区块剔除边界 chunkCullingBounds 用于剔除Tilemap区块的边界。 Bounds used for culling of Tilemap chunks.
区块大小 chunkSize TilemapRenderer创建的每个块的切片数大小。 Size in number of tiles of each chunk created by the TilemapRenderer.
检测区块剔除边界 detectChunkCullingBounds 返回TilemapRenderer是否自动检测边界以扩展块剔除。 Returns whether the TilemapRenderer automatically detects the bounds to extend chunk culling by.
蒙版交互 maskInteraction 指定Tilemap与蒙版的交互方式。 Specifies how the Tilemap interacts with the masks.
最大区块数量 maxChunkCount TilemapRenderer在内存中缓存的最大块数。 Maximum number of chunks the TilemapRenderer caches in memory.
最大帧数 maxFrameAge TilemapRenderer将未使用的块保留在内存中的最大帧数。 Maximum number of frames the TilemapRenderer keeps unused chunks in memory.
模式 mode TileMapRenderer批处理图块以进行渲染的模式。 The mode in which the TileMapRenderer batches the tiles for rendering.
排序 sortOrder TilemapRenderer的活动排序顺序。 Active sort order for the TilemapRenderer.

Inherited Members 基础成员

Properties 属性

游戏对象 gameObject 该组件附加到的游戏对象。组件始终附加在游戏对象上。 The game object this component is attached to. A component is always attached to a game object.
标签 tag 此游戏对象的标签。 The tag of this game object.
转换 transform 附加到此GameObject的Transform。/td> The Transform attached to this GameObject.
隐藏标志 hideFlags 该对象是否应该隐藏,随场景保存或可由用户修改? Should the object be hidden, saved with the Scene or modifiable by the user?
名字 name 对象的名称。 The name of the object.
允许动态遮挡 allowOcclusionWhenDynamic 控制是否应对此渲染器执行动态遮挡剔除。 Controls if dynamic occlusion culling should be performed for this renderer.
边界 bounds 渲染器的边界体积(只读)。 The bounding volume of the renderer (Read Only).
启用 enabled 如果启用,则使渲染的3D对象可见。 Makes the rendered 3D object visible if enabled.
是否为(部分)静态批处理 isPartOfStaticBatch 此渲染器是否已与其他任何渲染器一起进行了静态批处理? Has this renderer been statically batched with any other renderers?
是否可见 isVisible 该渲染器在任何相机中都可见吗?(只读) Is this renderer visible in any camera? (Read Only)
光照贴图索引 lightmapIndex 应用于此渲染器的烘焙光照贴图的索引。 The index of the baked lightmap applied to this renderer.
光照贴图的比例与偏移 lightmapScaleOffset 用于光照贴图的UV比例和偏移量。 The UV scale & offset used for a lightmap.
光探针代理体积(重载) lightProbeProxyVolumeOverride 如果设置,则渲染器将使用附加到源GameObject的“Light Probe Proxy Volume(光探针代理体积)”组件。 If set, the Renderer will use the Light Probe Proxy Volume component attached to the source GameObject.
光探测器的使用 lightProbeUsage 光探头插补类型。 The light probe interpolation type.
局部到世界矩阵 localToWorldMatrix 将点从局部空间转换为世界空间的矩阵(只读)。 Matrix that transforms a point from local space into world space (Read Only).
材质 material 返回分配给渲染器的第一个实例化的Material。 Returns the first instantiated Material assigned to the renderer.
材质(s) materials 返回此对象的所有实例化材料。 Returns all the instantiated materials of this object.
运动矢量产生的模式 motionVectorGenerationMode 指定运动矢量渲染的模式。 Specifies the mode for motion vector rendering.
探测锚点/td> probeAnchor 如果设置,Renderer将使用此Transform的位置来查找光或反射探测。 If set, Renderer will use this Transform's position to find the light or reflection probe.
实时光照贴图的索引 realtimeLightmapIndex 应用于此渲染器的实时光照贴图的索引。 The index of the realtime lightmap applied to this renderer.
实时光照贴图比例与偏移 realtimeLightmapScaleOffset 用于实时光照贴图的UV比例和偏移量。 The UV scale & offset used for a realtime lightmap.
接收阴影 receiveShadows 这个物体会接收阴影吗? Does this object receive shadows?
反射探头的使用 reflectionProbeUsage 该反射器是否应使用反射探针? Should reflection probes be used for this Renderer?
渲染器的优先级 rendererPriority 此值按优先级对渲染器进行排序。较低的值首先呈现,较高的值最后呈现。 This value sorts renderers by priority. Lower values are rendered first and higher values are rendered last.
渲染图层蒙版 renderingLayerMask 确定此渲染器位于哪个渲染层上。 Determines which rendering layer this renderer lives on.
投射阴影模式 shadowCastingMode 这个物体会投射阴影吗? Does this object cast shadows?
共享材质 sharedMaterial 此对象的共享材质。 The shared material of this object.
共享材质(s) sharedMaterials 该对象的所有共享材质。 All the shared materials of this object.
排序层ID sortingLayerID 渲染器排序层的唯一ID。 Unique ID of the Renderer's sorting layer.
排序层名称 sortingLayerName 渲染器排序层的名称。 Name of the Renderer's sorting layer.
排序顺序 sortingOrder 排序层中的渲染器顺序。 Renderer's order within a sorting layer.
世界到局部矩阵 worldToLocalMatrix 将点从世界空间转换为局部空间的矩阵(只读)。 Matrix that transforms a point from world space into local space (Read Only).

Public Methods 公共方法

广播消息 BroadcastMessage 在此游戏对象或其任何子级中的每个MonoBehaviour上调用名为methodName的方法。 Calls the method named methodName on every MonoBehaviour in this game object or any of its children.
比较标签 CompareTag 这个游戏对象是否带有标签? Is this game object tagged with tag ?
获取组件 GetComponent 如果游戏对象附加了一个,则返回Type类型的组件;如果没有,则返回null。 Returns the component of Type type if the game object has one attached, null if it doesn't.
获取子类组件 GetComponentInChildren 使用深度优先搜索返回GameObject或其任何子级中Type类型的组件。 Returns the component of Type type in the GameObject or any of its children using depth first search.
获取父类组件 GetComponentInParent 返回GameObject或其任何父代中Type类型的组件。 Returns the component of Type type in the GameObject or any of its parents.
获取组件(s) GetComponents 返回GameObject中Type类型的所有组件。 Returns all components of Type type in the GameObject.
获取子类组件(s) GetComponentsInChildren 返回GameObject或其任何子级中Type类型的所有组件。 Returns all components of Type type in the GameObject or any of its children.
获取父类组件(s) GetComponentsInParent 返回GameObject或其任何父代中Type类型的所有组件。 Returns all components of Type type in the GameObject or any of its parents.
发生消息 SendMessage 在此游戏对象中的每个MonoBehaviour上调用名为methodName的方法。 Calls the method named methodName on every MonoBehaviour in this game object.
向上发生消息 SendMessageUpwards 在此游戏对象中的每个MonoBehaviour以及该行为的每个祖先上调用名为methodName的方法。 Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.
尝试获取组件 TryGetComponent 获取指定类型的组件(如果存在)。 Gets the component of the specified type, if it exists.
获取实例ID GetInstanceID 返回对象的实例ID。 Returns the instance id of the object.
返回字符串 ToString 返回对象的名称。 Returns the name of the object.
获取最近的反射探针 GetClosestReflectionProbes 返回具有权重的最近反射探针的数组,权重显示探针对渲染器的影响程度,当反射探针之间发生混合时,也会使用此值。 Returns an array of closest reflection probes with weights, weight shows how much influence the probe has on the renderer, this value is also used when blending between reflection probes occur.
获取材质(s) GetMaterials 返回此对象的所有实例化材料。 Returns all the instantiated materials of this object.
获取属性区块 GetPropertyBlock 获取每个渲染器或每个材质的属性块。 Get per-Renderer or per-Material property block.
获取共享材质(s) GetSharedMaterials 返回此对象的所有共享材料。 Returns all the shared materials of this object.
s是否有属性区块 HasPropertyBlock 如果渲染器具有通过SetPropertyBlock附加的Material属性块,则返回true。 Returns true if the Renderer has a material property block attached via SetPropertyBlock.
设置属性区块 SetPropertyBlock 使您可以设置或清除每个渲染器或每个材质的参数替代。 Lets you set or clear per-renderer or per-material parameter overrides.

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.
查找对象(s)类型 FindObjectsOfType 返回所有类型为Type的活动加载对象的列表。 Returns a list of all active loaded objects of Type type.
实例化 Instantiate 克隆对象原始对象并返回克隆。。 Clones the object original and returns the clone.

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 消息

当变成不可见时 OnBecameInvisible 当该对象不再由任何摄像机可见时,将调用OnBecameInvisible。 OnBecameInvisible is called when the object is no longer visible by any camera.
当变成可见时 OnBecameVisible 当对象被任何摄像机可见时,将调用OnBecameVisible。 OnBecameVisible is called when the object became visible by any camera.