Class Vector3AffordanceReceiver
Affordance receiver applying a Vector3 (Float3) affordance theme. Broadcasts new affordance value with Unity Event.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver.Primitives
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[AddComponentMenu("Affordance System/Receiver/Primitives/Vector3 Affordance Receiver", 12)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.5/api/UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver.Primitives.Vector3AffordanceReceiver.html")]
public class Vector3AffordanceReceiver : BaseAsyncAffordanceStateReceiver<float3>, IAffordanceStateReceiver<float3>, IAsyncAffordanceStateReceiver, IAffordanceStateReceiver
Properties
affordanceThemeDatum
Affordance theme datum property used as a template for creating the runtime copy used during initialization.
Declaration
public Vector3AffordanceThemeDatumProperty affordanceThemeDatum { get; set; }
Property Value
Type | Description |
---|---|
Vector3AffordanceThemeDatumProperty |
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<float3> affordanceValue { get; }
Property Value
Type | Description |
---|---|
BindableVariable<float3> |
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<float3> defaultAffordanceTheme { get; }
Property Value
Type | Description |
---|---|
BaseAffordanceTheme<float3> |
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 Vector3UnityEvent valueUpdated { get; set; }
Property Value
Type | Description |
---|---|
Vector3UnityEvent |
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<float3> GenerateNewAffordanceThemeInstance()
Returns
Type | Description |
---|---|
BaseAffordanceTheme<float3> | Returns a new instance of the affordance theme. |
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
ScheduleTweenJob(ref TweenJobData<float3>)
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<float3> jobData)
Parameters
Type | Name | Description |
---|---|---|
TweenJobData<float3> | jobData | Typed job data used in tween job. |
Returns
Type | Description |
---|---|
JobHandle | Returns the handle identifying the scheduled job. |