Tilemap Renderer 组件是 Tilemap 游戏对象的一部分。它确定 Tilemap 上设置的 Tiles 的渲染方式。
属性 | 功能 |
---|---|
Sort Order | 设置所选瓦片地图上的瓦片排序方向。 |
Mode | 设置渲染器的渲染模式。 |
Chunk | 渲染器按位置对瓦片进行分组,并将瓦片的精灵一起批处理以进行渲染。选择此模式可在瓦片地图中获得最佳渲染性能。 |
Individual | 渲染器单独渲染每个瓦片,并且考虑它们的位置和排序顺序。此模式使瓦片上的精灵能够与场景中的其他渲染器或与自定义排序轴进行交互。 |
Detect Chunk Culling Bounds | 确定渲染器如何检测用于剔除瓦片地图块的边界。这些边界可扩展瓦片地图块的边界,以确保在剔除过程中不会裁剪过大的精灵。 |
Auto | 渲染器会自动检查瓦片使用的精灵,以确定要使用的扩展剔除边界。 |
Manual | 用于扩展边界以剔除瓦片地图块的值是手动设置的,而不使用 Editor 的自动检测功能。 |
Chunk Culling Bounds | 如果选择了上面的 Manual,则会启用。输入剔除边界扩展的值(采用 Unity 单位)。 |
Sorting Layer | 设置瓦片地图的 Sorting Layer)。从下拉框中选择现有的排序图层,或创建新的排序图层。 |
Order in Layer | 设置瓦片地图在其排序图层中的渲染优先级。首先渲染编号较低的图层。编号较高的图层叠加在前者之上。 |
Mask Interaction | 设置 Tilemap Renderer 在与精灵遮罩交互时的行为方式。 |
None | 瓦片地图渲染器不与场景中的任何精灵遮罩交互。这是默认选项。 |
Visible Inside Mask | Tilemap Renderer 仅渲染 Sprite Mask 覆盖的 Tilemap 区域。 |
Visible Outside Mask | Tilemap Renderer 完全渲染 Tilemap,但减去 Sprite Mask 覆盖的区域。 |
页面内容和屏幕截图更新于 2020.1 NewIn20201 在 2017.2 版中添加了瓦片地图 NewIn20172
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.