Class LayerData
Base class for all layer data objects. Every layer needs to be defined by one data object even if it's just a simple subclass of LayerData.
Inherited Members
Namespace: Unity.XR.CompositionLayers.Layers
Assembly: solution.dll
Syntax
[Serializable]
public class LayerData
Fields
ReportStateChange
Report state change for the CompositionLayer associated with this LayerData.
Declaration
protected Action ReportStateChange
Field Value
Type | Description |
---|---|
Action |
Properties
BlendType
Blend type. This value will be fixed with PlatformProvider.SupportedBlendTypes.
Declaration
public BlendType BlendType { get; set; }
Property Value
Type | Description |
---|---|
BlendType |
BlendTypeDirectly
Blend type without fallback. Some blend types aren't supported on specific platforms.
Declaration
public BlendType BlendTypeDirectly { get; }
Property Value
Type | Description |
---|---|
BlendType |
Methods
CopyFrom(LayerData)
Used to copy values from another layer data instance
Declaration
public virtual void CopyFrom(LayerData layerData)
Parameters
Type | Name | Description |
---|---|---|
LayerData | layerData | Layer data to copy from |
OnValidate()
A class you can derive from if you want to create objects that live independently of GameObjects.
Declaration
protected virtual void OnValidate()
UpdateValue<T>(T, T)
Check if new value != old value. If it is, then report state change and return new value. Otherwise return old value
Declaration
protected T UpdateValue<T>(T oldValue, T newValue)
Parameters
Type | Name | Description |
---|---|---|
T | oldValue | Current value to check for equality |
T | newValue | The new value we want to change the old value to. |
Returns
Type | Description |
---|---|
T | Old value if new value is the same, otherwise the new value. |
Type Parameters
Name | Description |
---|---|
T | Type of old and new value. |