Class MaterialHelperBase
Base class for renderer bridge components that abstract the work of setting up material instances or property blocks.
Inherited Members
      Object.FindObjectsByType<T>(FindObjectsSortMode)
    
    
    
      Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    
    
    
    
      Object.FindFirstObjectByType<T>()
    
    
      Object.FindAnyObjectByType<T>()
    
    
      Object.FindFirstObjectByType<T>(FindObjectsInactive)
    
    
      Object.FindAnyObjectByType<T>(FindObjectsInactive)
    
    
    
    
    
    
    
    
    
    
    
    
    
    
  Namespace: UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Rendering
Assembly: Unity.XR.Interaction.Toolkit.dll
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 | 
|---|---|
| bool | 
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 | 
|---|---|
| int | 
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()