class
ReflectionProbe
Specifies a location at which a pre-computed texture containing scene radiance will be generated.
This texture will then be used by the renderer to provide specular reflections.
Public
Constructors
ReflectionProbe
Methods
SetRadius
Determines the radius of a sphere reflection probe.
SetExtents
Determines the extents of a box reflection probe.
Determines range of influence.
SetTransitionDistance
Determines a distance that will be used for fading out the box reflection probe with distance.
By default it is equal to one, and can never be less than one. Only relevant for box probes.
SetCustomTexture
Allows you assign a custom texture to use as a reflection map.
This will disable automatic generation of reflections. To re-enable auto-generation call this with a null parameter.
GetCustomTexture
GetWorldRadius
Returns the radius of a sphere reflection probe, scaled by scene object transform.
GetWorldExtents
Returns the extents of a box reflection probe, scaled by scene object transform.
Capture
Captures the scene at the current location and generates a filtered reflection cubemap.
No action is taken if a custom texture is set.
staticGetRttiStatic
GetRadius
Returns the radius of a sphere reflection probe (unscaled).
GetExtents
Returns the extents of a box reflection probe (unscaled).
GetBounds
Returns world space bounds that completely encompass the probe's area of influence.
GetTransitionDistance
Determines a distance that will be used for fading out the box reflection probe with distance.
By default it is equal to one, and can never be less than one. Only relevant for box probes.
GetFilteredTexture
Returns a pre-filtered texture that is generated either from the provided custom texture, or from scene capture.
Protected
Constructors
ReflectionProbe
Methods
Initialize
Construct any resources the component needs before use.
Called when the parent scene object is initialized. A non-initialized component shouldn't be used in a live scene (i.e. it should not receive any of the component logic updates or events).
OnCreated
Called once when the component has been created.
Called regardless of the state the component is in.
OnEnabled
Called every time a component leaves the Stopped state, if the component is enabled.
This includes component creation if requirements for leaving the Stopped state are met. When called during creation it is called after OnBeginPlay.
OnDisabled
Called every time a component is placed into the Stopped state.
This includes component destruction if component wasn't already in Stopped state during destruction. When called during destruction it is called before OnDestroyed.
OnDestroyed
Called once just before the component is destroyed.
Called regardless of the state the component is in.
OnSceneChanged
Called when the parent SceneObject's ECS entity is migrated to a new registry (e.g. when moving between scenes).
The old scene and entity are provided so that components can access sub-systems (renderer, physics, etc.) and read any data stored only in ECS fragments.
OnTransformChanged
Called when the component's parent scene object has changed.
Not called if the component is in Stopped state. Also only called if necessary notify flags are set via SetNotifyFlagsInternal().
Update
Called once per frame.
Only called if the component is in Running state.
Private
Methods
MarkRenderProxyDataDirty
Marks the reflection probe as dirty, adding the appropriate ECS dirty tag.
GetReflectionProbeData
Returns a reference to the reflection probe data for the CRTP getter interface.
GetFragment
Returns a mutable reference to the ECS reflection probe fragment.
GetFragment
Returns a const reference to the ECS reflection probe fragment.
UpdateBounds
Updates the internal bounds for the probe.
Call this whenever a property affecting the bounds changes.