リフレクションプローブは周囲の環境を、シェーダーに渡されるテクスチャへとキャプチャし、反射を表現するために使用される技術です。
プロパティーはインスペクターの値と完全に一致しています。
このクラスは reflection probe コンポーネントのためのスクリプトインターフェースです。
リフレクションプローブは通常、エディターで作成するものですがスクリプトから作成したいときもあるかもしれません。
using UnityEngine; using UnityEditor;
public class ProbeCreator { [MenuItem("ReflectionProbe/CreateRealtimeProbe")] public static void RealtimeProbe() { // Add a GameObject with a ReflectionProbe component GameObject probeGameObject = new GameObject("Realtime Reflection Probe"); ReflectionProbe probeComponent = probeGameObject.AddComponent<ReflectionProbe>(); // The probe will contribute to reflections inside a box of size 10x10x10 centered on the position of the probe probeComponent.size = new Vector3(10, 10, 10);
// Set the type to realtime and refresh the probe every frame probeComponent.mode = UnityEngine.Rendering.ReflectionProbeMode.Realtime; probeComponent.refreshMode = UnityEngine.Rendering.ReflectionProbeRefreshMode.EveryFrame; } }
defaultTexture | The surface texture of the default reflection probe that captures the environment contribution. Read only. |
defaultTextureHDRDecodeValues | HDR decode values of the default reflection probe texture. |
backgroundColor | リフレクションプローブのテクスチャが内容を決めるのに使用する色 |
bakedTexture | リフレクションプローブの周囲にあるベイクされたテクスチャへの参照 |
blendDistance | ブレンドで周囲にあるプローブを使用する距離(遅延プローブで使用されます) |
bounds | The probe's world space axis-aligned bounding box in which the probe can contribute to reflections (Read Only). |
boxProjection | このリフレクションプローブがボックスプロジェクションを使用するかどうか |
center | The center of the probe's bounding box in which the probe can contribute to reflections. The center is relative to the position of the probe. |
clearFlags | リフレクションプローブが背景をどのように決定するか |
cullingMask | これはリフレクションプローブの周囲にあるものを選択的に描画するために使用されます。 |
customBakedTexture | リフレクションプローブの周囲にあるベイクされたテクスチャへの参照。カスタムリフレクションのテクスチャを割り当てるために使用します。 |
farClipPlane | プローブを描画するカメラから最も遠い距離 |
hdr | 現在のリフレクションプローブが HDR レンダリングを使用するかどうか |
importance | リフレクションプローブの重要度 |
intensity | リフレクションプローブのテクスチャをシェーダーにどれだけ適用するか。 |
mode | リフレクションプローブテクスチャをエディターで生成するか (ReflectionProbeMode.Baked) 、プローブがカスタム特定テクスチャを使用するか (ReflectionProbeMode.Custom) |
nearClipPlane | プローブを描画するカメラから最も近い距離 |
realtimeTexture | Reference 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. |
renderDynamicObjects | 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. |
resolution | 根幹をなすリフレクションテクスチャをピクセル数で表した解像度 |
shadowDistance | プローブをレンダリングするときに影も描画する距離 |
size | The size of the probe's bounding box in which the probe can contribute to reflections. The size is in world space. |
texture | リフレクションプローブ付近にある、オブジェクトのシェーダーに渡されるテクスチャ(読み取り専用) |
textureHDRDecodeValues | HDR decode values of the reflection probe texture. |
timeSlicingMode | プローブの time-slicing モードを設定します。See Also: ReflectionProbeTimeSlicingMode. |
IsFinishedRendering | プローブが time-slice モードの描画を終えたかをチェックします。 |
RenderProbe | プローブのキューブマップを更新します。 |
Reset | Revert all ReflectionProbe parameters to default. |
BlendCubemap | 2つのキューブマップをブレンドして、ターゲットレンダーテクスチャにするためのユーティリティーメソッドです。 |
UpdateCachedState | Updates 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. |
defaultReflectionSet | Adds a delegate to get notifications when the default specular Cubemap is changed. |
defaultReflectionTexture | Adds a delegate to get notifications when the default specular Cubemap is changed. |
reflectionProbeChanged | Adds a delegate to get notifications when a Reflection Probe is added to a Scene or removed from a Scene. |
enabled | 有効であれば更新され、無効であれば更新されません。 |
isActiveAndEnabled | Reports whether a GameObject and its associated Behaviour is active and enabled. |
gameObject | このコンポーネントはゲームオブジェクトにアタッチされます。コンポーネントはいつもゲームオブジェクトにアタッチされています。 |
tag | ゲームオブジェクトのタグ |
transform | The Transform attached to this GameObject. |
hideFlags | Should the object be hidden, saved with the Scene or modifiable by the user? |
name | オブジェクト名 |
BroadcastMessage | ゲームオブジェクトまたは子オブジェクトにあるすべての MonoBehaviour を継承したクラスにある methodName 名のメソッドを呼び出します。 |
CompareTag | Checks the GameObject's tag against the defined tag. |
GetComponent | Gets a reference to a component of type T on the same GameObject as the component specified. |
GetComponentInChildren | Gets a reference to a component of type T on the same GameObject as the component specified, or any child of the GameObject. |
GetComponentInParent | Gets a reference to a component of type T on the same GameObject as the component specified, or any parent of the GameObject. |
GetComponents | Gets references to all components of type T on the same GameObject as the component specified. |
GetComponentsInChildren | Gets references to all components of type T on the same GameObject as the component specified, and any child of the GameObject. |
GetComponentsInParent | Gets references to all components of type T on the same GameObject as the component specified, and any parent of the GameObject. |
SendMessage | ゲームオブジェクトにアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します |
SendMessageUpwards | ゲームオブジェクトと親(の親、さらに親 ... )にアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します |
TryGetComponent | Gets the component of the specified type, if it exists. |
GetInstanceID | Gets the instance ID of the object. |
ToString | Returns the name of the object. |
Destroy | Removes a GameObject, component or asset. |
DestroyImmediate | Destroys the object obj immediately. You are strongly recommended to use Destroy instead. |
DontDestroyOnLoad | Do not destroy the target Object when loading a new Scene. |
FindAnyObjectByType | Retrieves any active loaded object of Type type. |
FindFirstObjectByType | Retrieves the first active loaded object of Type type. |
FindObjectOfType | タイプ type から最初に見つけたアクティブのオブジェクトを返します |
FindObjectsByType | Retrieves a list of all loaded objects of Type type. |
FindObjectsOfType | Gets a list of all loaded objects of Type type. |
Instantiate | original のオブジェクトをクローンします |
bool | オブジェクトが存在するかどうか |
operator != | 二つのオブジェクトが異なるオブジェクトを参照しているか比較します |
operator == | 2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.