Class Vector4AffordanceReceiver
Affordance receiver applying a Vector4 (Float4) affordance theme. Broadcasts new affordance value with Unity Event.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver.Primitives
Syntax
[AddComponentMenu("Affordance System/Receiver/Primitives/Vector4 Affordance Receiver", 12)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.3/api/UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver.Primitives.Vector4AffordanceReceiver.html")]
public class Vector4AffordanceReceiver : BaseAsyncAffordanceStateReceiver<float4>, IAffordanceStateReceiver<float4>, IAsyncAffordanceStateReceiver, IAffordanceStateReceiver
Properties
affordanceThemeDatum
Affordance theme datum property used as a template for creating the runtime copy used during initialization.
Declaration
public Vector4AffordanceThemeDatumProperty affordanceThemeDatum { get; set; }
Property Value
Type | Description |
---|---|
Vector4AffordanceThemeDatumProperty |
Remarks
This value can be bypassed by directly setting the affordanceTheme at runtime.
See Also
affordanceValue
Bindable variable for current typed affordance value. Updated as scheduled tween jobs complete.
Declaration
protected override BindableVariable<float4> affordanceValue { get; }
Property Value
Type | Description |
---|---|
BindableVariable<float4> |
Overrides
See Also
defaultAffordanceTheme
The default affordance theme that is cloned and assigned to affordanceTheme during initialization if that property is not set.
Declaration
protected override BaseAffordanceTheme<float4> defaultAffordanceTheme { get; }
Property Value
Type | Description |
---|---|
BaseAffordanceTheme<float4> |
Overrides
Remarks
This should typically be the theme contained in a serialized ScriptableObject asset reference.
See Also
valueUpdated
The event that is called when the current affordance value is updated.
Declaration
public Vector4UnityEvent valueUpdated { get; set; }
Property Value
Type | Description |
---|---|
Vector4UnityEvent |
Methods
GenerateNewAffordanceThemeInstance()
Automatically called by Unity during initialization to create a new instance of the affordance theme used for this receiver.
Declaration
protected override BaseAffordanceTheme<float4> GenerateNewAffordanceThemeInstance()
Returns
Type | Description |
---|---|
BaseAffordanceTheme<float4> | Returns a new instance of the affordance theme. |
Overrides
OnAffordanceValueUpdated(float4)
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(float4 newValue)
Parameters
Type | Name | Description |
---|---|---|
float4 | newValue |
Overrides
ScheduleTweenJob(ref TweenJobData<float4>)
Generate the tween job from the given job data and schedule the job for execution on a worker thread.
Declaration
protected override JobHandle ScheduleTweenJob(ref TweenJobData<float4> jobData)
Parameters
Type | Name | Description |
---|---|---|
TweenJobData<float4> | jobData |
Returns
Type | Description |
---|---|
JobHandle | Returns the handle identifying the scheduled job. |