ReflectionProbe

Struct ReflectionProbe 

Source
pub struct ReflectionProbe {
Show 25 fields pub m_BackGroundColor: ColorRGBA, pub m_BakedTexture: PPtr, pub m_BoxOffset: Vector3f, pub m_BoxProjection: bool, pub m_BoxSize: Vector3f, pub m_ClearFlags: u32, pub m_CullingMask: BitField, pub m_CustomBakedTexture: PPtr, pub m_Enabled: u8, pub m_FarClip: f32, pub m_GameObject: PPtr, pub m_HDR: bool, pub m_Importance: i32, pub m_IntensityMultiplier: f32, pub m_Mode: i32, pub m_NearClip: f32, pub m_RefreshMode: i32, pub m_RenderDynamicObjects: bool, pub m_Resolution: i32, pub m_ShadowDistance: f32, pub m_TimeSlicingMode: i32, pub m_Type: i32, pub m_UpdateFrequency: i32, pub m_UseOcclusionCulling: bool, pub m_BlendDistance: Option<f32>,
}
Expand description

ReflectionProbe is a class of the Unity engine since version 5.0.0f4. Exert from Unity’s scripting documentation: The reflection probe is used to capture the surroundings into a texture which is passed to the shaders and used for reflections. The properties are an exact match for the values shown in the Inspector.This class is a script interface for a reflection probe component.

Reflection probes are usually just created in the Editor, but sometimes you might want to create a reflection probe from a script:

Fields§

§m_BackGroundColor: ColorRGBA

The color with which the texture of reflection probe will be cleared.

§m_BakedTexture: PPtr

Reference to the baked texture of the reflection probe’s surrounding. PPtr<Texture>: (5.0.0f4 - 2022.3.2f1)

§m_BoxOffset: Vector3f§m_BoxProjection: bool

Should this reflection probe use box projection?

§m_BoxSize: Vector3f§m_ClearFlags: u32

How the reflection probe clears the background.

§m_CullingMask: BitField

This is used to render parts of the reflecion probe’s surrounding selectively.

§m_CustomBakedTexture: PPtr

Reference to the baked texture of the reflection probe’s surrounding. Use this to assign custom reflection texture. PPtr<Texture>: (5.0.0f4 - 2022.3.2f1)

§m_Enabled: u8

Enabled Behaviours are Updated, disabled Behaviours are not.

§m_FarClip: f32§m_GameObject: PPtr

The game object this component is attached to. A component is always attached to a game object. PPtr<GameObject>: (5.0.0f4 - 2022.3.2f1)

§m_HDR: bool

Should this reflection probe use HDR rendering?

§m_Importance: i32

Reflection probe importance.

§m_IntensityMultiplier: f32§m_Mode: i32

Should reflection probe texture be generated in the Editor (ReflectionProbeMode.Baked) or should probe use custom specified texure (ReflectionProbeMode.Custom)?

§m_NearClip: f32§m_RefreshMode: i32

Sets the way the probe will refresh.See Also: ReflectionProbeRefreshMode.

§m_RenderDynamicObjects: bool

Specifies whether Unity should render non-static GameObjects into the Reflection Probe. If you set this to true, Unity renders non-static GameObjects into the Reflection Probe. If you set this to false, Unity does not render non-static GameObjects into the Reflection Probe. Unity only takes this property into account if the Reflection Probe’s Type is Custom.

§m_Resolution: i32

Resolution of the underlying reflection texture in pixels.

§m_ShadowDistance: f32

Shadow drawing distance when rendering the probe.

§m_TimeSlicingMode: i32

Sets this probe time-slicing modeSee Also: ReflectionProbeTimeSlicingMode.

§m_Type: i32§m_UpdateFrequency: i32§m_UseOcclusionCulling: bool§m_BlendDistance: Option<f32>

Distance around probe used for blending (used in deferred probes). f32: (5.2.0f2 - 2022.3.2f1)

Trait Implementations§

Source§

impl Debug for ReflectionProbe

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ReflectionProbe

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ReflectionProbe

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,