Version: 2021.2
言語: 日本語

ReflectionProbe

class in UnityEngine

/

継承:Behaviour

マニュアルに切り替える

説明

リフレクションプローブは周囲の環境を、シェーダーに渡されるテクスチャへとキャプチャし、反射を表現するために使用される技術です。

プロパティーはインスペクターの値と完全に一致しています。

このクラスは reflection probe コンポーネントのためのスクリプトインターフェースです。

リフレクションプローブは通常、エディターで作成するものですがスクリプトから作成したいときもあるかもしれません。

using UnityEngine;

public class Example : MonoBehaviour { void Start() { // Make a game object GameObject probeGameObject = new GameObject("The Reflection Probe");

// Add the reflection probe component ReflectionProbe probeComponent = probeGameObject.AddComponent<ReflectionProbe>() as ReflectionProbe;

// Set texture resolution probeComponent.resolution = 256;

// Reflection will be used for objects in 10 units around the position of the probe probeComponent.size = new Vector3(10, 10, 10);

// Set the position (or any transform property) probeGameObject.transform.position = new Vector3(0, 5, 0); } }

Static 変数

defaultTextureThe surface texture of the default reflection probe that captures the environment contribution. Read only.
defaultTextureHDRDecodeValuesHDR decode values of the default reflection probe texture.

変数

backgroundColorリフレクションプローブのテクスチャが内容を決めるのに使用する色
bakedTextureリフレクションプローブの周囲にあるベイクされたテクスチャへの参照
blendDistanceブレンドで周囲にあるプローブを使用する距離(遅延プローブで使用されます)
boundsリフレクションプローブの大きさ(読み取り専用)
boxProjectionこのリフレクションプローブがボックスプロジェクションを使用するかどうか
center反射がオブジェクトに適用されるエリアをボックス形状で表したものの中心位置です。プローブのローカル空間基準で測られます。
clearFlagsリフレクションプローブが背景をどのように決定するか
cullingMaskこれはリフレクションプローブの周囲にあるものを選択的に描画するために使用されます。
customBakedTextureリフレクションプローブの周囲にあるベイクされたテクスチャへの参照。カスタムリフレクションのテクスチャを割り当てるために使用します。
farClipPlaneプローブを描画するカメラから最も遠い距離
hdr現在のリフレクションプローブが HDR レンダリングを使用するかどうか
importanceリフレクションプローブの重要度
intensityリフレクションプローブのテクスチャをシェーダーにどれだけ適用するか。
modeリフレクションプローブテクスチャをエディターで生成するか (ReflectionProbeMode.Baked) 、プローブがカスタム特定テクスチャを使用するか (ReflectionProbeMode.Custom)
nearClipPlaneプローブを描画するカメラから最も近い距離
realtimeTextureReference to the real-time texture of the reflection probe's surroundings. Use this to assign a RenderTexture to use for real-time reflection.
refreshModeプローブのリフレッシュ方法を設定します。See Also: ReflectionProbeRefreshMode.
renderDynamicObjectsSpecifies 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.
resolution根幹をなすリフレクションテクスチャをピクセル数で表した解像度
shadowDistanceプローブをレンダリングするときに影も描画する距離
size反射がオブジェクトに適用されるエリアをボックス形状で表したサイズです。プローブのローカル空間基準で計測されます。
textureリフレクションプローブ付近にある、オブジェクトのシェーダーに渡されるテクスチャ(読み取り専用)
textureHDRDecodeValuesHDR decode values of the reflection probe texture.
timeSlicingModeプローブの time-slicing モードを設定します。See Also: ReflectionProbeTimeSlicingMode.

Public 関数

IsFinishedRenderingプローブが time-slice モードの描画を終えたかをチェックします。
RenderProbeプローブのキューブマップを更新します。
ResetRevert all ReflectionProbe parameters to default.

Static 関数

BlendCubemap2つのキューブマップをブレンドして、ターゲットレンダーテクスチャにするためのユーティリティーメソッドです。
UpdateCachedStateUpdates the culling system with the ReflectionProbe's current state. This ensures that Unity correctly culls the ReflectionProbe during rendering if you implement your own runtime reflection system.

Events

defaultReflectionSetAdds a delegate to get notifications when the default specular Cubemap is changed.
defaultReflectionTextureAdds a delegate to get notifications when the default specular Cubemap is changed.
reflectionProbeChangedAdds a delegate to get notifications when a Reflection Probe is added to a Scene or removed from a Scene.

継承メンバー

変数

enabled有効であれば更新され、無効であれば更新されません。
isActiveAndEnabledReports whether a GameObject and its associated Behaviour is active and enabled.
gameObjectこのコンポーネントはゲームオブジェクトにアタッチされます。コンポーネントはいつもゲームオブジェクトにアタッチされています。
tagゲームオブジェクトのタグ
transformThe Transform attached to this GameObject.
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameオブジェクト名

Public 関数

BroadcastMessageゲームオブジェクトまたは子オブジェクトにあるすべての MonoBehaviour を継承したクラスにある methodName 名のメソッドを呼び出します。
CompareTagChecks the GameObject's tag against the defined tag.
GetComponentReturns the component of type if the GameObject has one attached.
GetComponentInChildrenReturns the Component of type in the GameObject or any of its children using depth first search.
GetComponentInParentReturns the Component of type in the GameObject or any of its parents.
GetComponents GameObject から type のタイプのコンポーネントを「すべて」取得します。
GetComponentsInChildrenReturns all components of Type type in the GameObject or any of its children. Works recursively.
GetComponentsInParent GameObject や深さ優先探索を活用して、親子関係にある親オブジェクトから type のタイプのコンポーネントを「すべて」取得します。
SendMessageゲームオブジェクトにアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します
SendMessageUpwardsゲームオブジェクトと親(の親、さらに親 ... )にアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します
TryGetComponentGets the component of the specified type, if it exists.
GetInstanceIDGets the instance ID of the object.
ToStringReturns the name of the object.

Static 関数

DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsOfTypeGets a list of all loaded objects of Type type.
Instantiateoriginal のオブジェクトをクローンします

Operator

boolオブジェクトが存在するかどうか
operator !=二つのオブジェクトが異なるオブジェクトを参照しているか比較します
operator ==2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961