Class ImageColorAffordanceReceiver
Affordance receiver applying a color theme to a UGUI Image component
Inheritance
ImageColorAffordanceReceiver
Inherited Members
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
UnityEngine.Object.FindFirstObjectByType<T>()
UnityEngine.Object.FindAnyObjectByType<T>()
UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver.UI
Syntax
[AddComponentMenu("Affordance System/Receiver/UI/Image Color Affordance Receiver", 12)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.3/api/UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver.UI.ImageColorAffordanceReceiver.html")]
public class ImageColorAffordanceReceiver : ColorAffordanceReceiver, IAffordanceStateReceiver<Color>, IAsyncAffordanceStateReceiver, IAffordanceStateReceiver
Properties
canvasGroup
If set, alpha changes will be applied to the CanvasGroup rather than the Image.
Declaration
public CanvasGroup canvasGroup { get; set; }
Property Value
Type | Description |
---|---|
CanvasGroup |
ignoreAlpha
Ignore alpha changes in color theme.
Declaration
public bool ignoreAlpha { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
image
Image to apply the color to.
Declaration
public Image image { get; set; }
Property Value
Type | Description |
---|---|
Image |
Methods
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
UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver.BaseAffordanceStateReceiver<UnityEngine.Color>.GetCurrentValueForCapture()
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 |
Overrides
OnEnable()
See MonoBehaviour.
Declaration
protected override void OnEnable()
Overrides
UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver.BaseAffordanceStateReceiver<UnityEngine.Color>.OnEnable()