Class ColorGradientLineRendererAffordanceReceiver
Affordance receiver used to animate Line Renderer start or end color.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver.Rendering
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[AddComponentMenu("Affordance System/Receiver/Rendering/Color Gradient Line Renderer Affordance Receiver", 12)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.5/api/UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver.Rendering.ColorGradientLineRendererAffordanceReceiver.html")]
public class ColorGradientLineRendererAffordanceReceiver : ColorAffordanceReceiver, IAffordanceStateReceiver<Color>, IAsyncAffordanceStateReceiver, IAffordanceStateReceiver
Properties
disableXRInteractorLineVisualColorControlIfPresent
Prevent XRInteractorLineVisual from controlling line rendering color if present.
Declaration
public bool disableXRInteractorLineVisualColorControlIfPresent { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
lineColorProperty
Mode determining how color is applied to the associated Line Renderer.
Declaration
public ColorGradientLineRendererAffordanceReceiver.LineColorProperty lineColorProperty { get; set; }
Property Value
Type | Description |
---|---|
ColorGradientLineRendererAffordanceReceiver.LineColorProperty |
See Also
lineRenderer
Line Renderer on which to animate colors.
Declaration
public LineRenderer lineRenderer { get; set; }
Property Value
Type | Description |
---|---|
LineRenderer |
Methods
Awake()
See MonoBehaviour.
Declaration
protected override void Awake()
Overrides
CaptureInitialValue()
One time call that captures the initial value used for certain processing operations.
Declaration
protected override void CaptureInitialValue()
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 Color GetCurrentValueForCapture()
Returns
Type | Description |
---|---|
Color | Initial value. |
Overrides
OnAffordanceValueUpdated(Color)
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(Color newValue)
Parameters
Type | Name | Description |
---|---|---|
Color | newValue | New typed affordance value. |
Overrides
Start()
See MonoBehaviour.
Declaration
protected override void Start()