Class Vector3MaterialPropertyAffordanceReceiver
Apply affordance to material property block Vector3 property.
Inheritance
BaseAffordanceStateReceiver<float3>
BaseAsyncAffordanceStateReceiver<float3>
Vector3MaterialPropertyAffordanceReceiver
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver.Rendering
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[AddComponentMenu("Affordance System/Receiver/Rendering/Vector3 Material Property Affordance Receiver", 12)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.5/api/UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver.Rendering.Vector3MaterialPropertyAffordanceReceiver.html")]
[RequireComponent(typeof(MaterialPropertyBlockHelper))]
public class Vector3MaterialPropertyAffordanceReceiver : Vector3AffordanceReceiver, IAffordanceStateReceiver<float3>, IAsyncAffordanceStateReceiver, IAffordanceStateReceiver
Properties
materialPropertyBlockHelper
Material Property Block Helper component reference used to set material properties.
Declaration
public MaterialPropertyBlockHelper materialPropertyBlockHelper { get; set; }
Property Value
Type | Description |
---|---|
MaterialPropertyBlockHelper |
vector3PropertyName
Shader property name to set the vector value of.
Declaration
public string vector3PropertyName { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
Awake()
See MonoBehaviour.
Declaration
protected override void Awake()
Overrides
GetCurrentValueForCapture()
Function used to get the current value of the receiver's target property. Is overriden for material properties or other targets where the initial state exists outside the receiver.
Declaration
protected override float3 GetCurrentValueForCapture()
Returns
Type | Description |
---|---|
float3 | Initial value. |
Overrides
OnAffordanceValueUpdated(float3)
Method that is called when the typed affordance value is updated. Implement this method in a derived class to apply the current affordance value, such as setting a material property or raising an event.
Declaration
protected override void OnAffordanceValueUpdated(float3 newValue)
Parameters
Type | Name | Description |
---|---|---|
float3 | newValue | New typed affordance value. |
Overrides
OnValidate()
See MonoBehaviour.
Declaration
protected void OnValidate()