Version: 2021.1

LightProbes

class in UnityEngine

/

继承自:Object

切换到手册

描述

存储所有当前已加载场景的光照探针。

数据包括:探针位置、球谐函数 (SH) 系数和四面体曲面细分。

可在运行时修改这些系数并更新四面体曲面细分。还可以使用 LightmapSettings.lightProbes 将整个 LightProbes 对象交换到不同的预烘培对象。

另请参阅:Unity 手册中的光照探针LightmapSettingsReceiveGI

变量

bakedProbes烘焙光照探针的系数。
cellCount空间划分为的单元格数(只读)。
count光照探针数(只读)。
positions烘焙光照探针的位置(只读)。

静态函数

CalculateInterpolatedLightAndOcclusionProbes计算给定世界空间位置处的光照探针和遮挡探针。
GetInterpolatedProbe对于合并的实时和烘焙光照探针,返回给定位置的插值探针。
TetrahedralizeSynchronously tetrahedralize the currently loaded LightProbe positions.
TetrahedralizeAsyncAsynchronously tetrahedralize the currently loaded LightProbe positions.

Events

needsRetetrahedralizationAn event which is called when the number of currently loaded light probes changes due to additive scene loading or unloading.
tetrahedralizationCompletedEvent which is called after LightProbes.Tetrahedralize or LightProbes.TetrahedralizeAsync has finished computing a tetrahedralization.

继承的成员

变量

hideFlags该对象应该隐藏、随场景一起保存还是由用户修改?
name对象的名称。

公共函数

GetInstanceIDGets the instance ID of the object.
ToString返回对象的名称。

静态函数

Destroy移除 GameObject、组件或资源。
DestroyImmediate立即销毁对象 /obj/。强烈建议您改用 Destroy。
DontDestroyOnLoad在加载新的 Scene 时,请勿销毁 Object。
FindObjectOfType返回第一个类型为 type 的已加载的激活对象。
FindObjectsOfTypeGets a list of all loaded objects of Type type.
Instantiate克隆 original 对象并返回克隆对象。

运算符

bool该对象是否存在?
operator !=比较两个对象是否引用不同的对象。
operator ==比较两个对象引用,判断它们是否引用同一个对象。