リフレクションプローブは周囲の環境を、シェーダーに渡されるテクスチャへとキャプチャし、反射を表現するために使用される技術です。
プロパティーはインスペクターの値と完全に一致しています。
このクラスは 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); } }
defaultTexture | Texture which is used outside of all reflection probes (Read Only). |
defaultTextureHDRDecodeValues | HDR 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 | プローブを描画するカメラから最も近い距離 |
realtimeTexture | Reference to the realtime texture of the reflection probe's surroundings. Use this to assign a RenderTexture to use for realtime 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 | 反射がオブジェクトに適用されるエリアをボックス形状で表したサイズです。プローブのローカル空間基準で計測されます。 |
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つのキューブマップをブレンドして、ターゲットレンダーテクスチャにするためのユーティリティーメソッドです。 |
defaultReflectionSet | 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 | Has the Behaviour had active and enabled called? |
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 | このゲームオブジェクトは tag とタグ付けされているかどうか |
GetComponent | Returns the component of Type type if the GameObject has one attached, null if it doesn't. Will also return disabled components. |
GetComponentInChildren | GameObject や深さ優先探索を活用して、親子関係にある子オブジェクトから type のタイプのコンポーネントを取得します。 |
GetComponentInParent | GameObject や深さ優先探索を活用して、親子関係にある親オブジェクトから type のタイプのコンポーネントを取得します。 |
GetComponents | GameObject から type のタイプのコンポーネントを「すべて」取得します。 |
GetComponentsInChildren | Returns all components of Type type in the GameObject or any of its children. Works recursively. |
GetComponentsInParent | GameObject や深さ優先探索を活用して、親子関係にある親オブジェクトから type のタイプのコンポーネントを「すべて」取得します。 |
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. |
FindObjectOfType | タイプ 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.