Renderer.realtimeLightmapIndex

Switch to Manual
public int realtimeLightmapIndex ;

Description

应用到该渲染器的实时光照贴图的索引。

默认值为 -1 (0xFFFF),表示未指定任何光照贴图。对于在光照贴图中缩放设置为 0 的对象,内部使用值 0xFFFE;它们会影响光照贴图,但没有为自身指定光照贴图。 内部索引为 16 位,不能大于 65533 (0xFFFE)。

Note: this property is only serialized when building the player. In all the other cases it's the responsibility of the Unity lightmapping system (or a custom script that brings external lightmapping data) to set it when the Scene loads or playmode is entered.

光照贴图是一种纹理图集,多个渲染器可以使用同一光照贴图的不同部分。

另请参阅:LightmapSettings 类、lightmapIndexlightmapScaleOffset 属性、ShaderLab properties