Class MaterialHelperBase
Base class for renderer bridge components that abstract the work of setting up material instances or property blocks.
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.Rendering
Syntax
public abstract class MaterialHelperBase : MonoBehaviour
Properties
isInitialized
Whether Initialize() has been called. The component is automatically initialized during OnEnable.
Declaration
protected bool isInitialized { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
See Also
materialIndex
The index of the material you want to set the parameters of.
Declaration
public int materialIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Remarks
Changing this value after being initialized is not supported.
rendererTarget
The renderer to set material parameter overrides on.
Declaration
public Renderer rendererTarget { get; set; }
Property Value
| Type | Description |
|---|---|
| Renderer |
Remarks
Changing this value after being initialized is not supported.
Methods
GetSharedMaterialForTarget()
Returns the Material for the rendererTarget located in array location materialIndex
Declaration
public Material GetSharedMaterialForTarget()
Returns
| Type | Description |
|---|---|
| Material | A Material from the current rendererTarget |
Initialize()
Initialize the property block or material instance.
Declaration
protected virtual void Initialize()
OnEnable()
See MonoBehaviour.
Declaration
protected void OnEnable()