Struct AnimationJobCache
AnimationJobCache can be used in animation jobs to store values that can be updated through the AnimationJobCache during the Update loop without rebuilding the job.
Namespace: UnityEngine.Animations.Rigging
Syntax
public struct AnimationJobCache : IDisposable
Methods
Dispose()
Dispose of the AnimationJobCache memory.
Declaration
public void Dispose()
Get<T>(CacheIndex, Int32)
Gets value at specified index.
Declaration
public T Get<T>(CacheIndex index, int offset = 0)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
CacheIndex | index | CacheIndex value. |
Int32 | offset | Offset to the CacheIndex. |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T | The value type. |
GetRaw(CacheIndex, Int32)
Gets raw float data at specified index.
Declaration
public float GetRaw(CacheIndex index, int offset = 0)
Parameters
Type | Name | Description |
---|---|---|
CacheIndex | index | CacheIndex value. |
Int32 | offset | Offset to the CacheIndex. |
Returns
Type | Description |
---|---|
Single | The raw float data. |
Set<T>(T, CacheIndex, Int32)
Sets value at specified index.
Declaration
public void Set<T>(T val, CacheIndex index, int offset = 0)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
T | val | Value. |
CacheIndex | index | CacheIndex value. |
Int32 | offset | Offset to the CacheIndex. |
Type Parameters
Name | Description |
---|---|
T |
SetArray<T>(T[], CacheIndex, Int32)
Sets an array of values at specified index.
Declaration
public void SetArray<T>(T[] v, CacheIndex index, int offset = 0)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
T[] | v | Array of values. |
CacheIndex | index | CacheIndex value. |
Int32 | offset | Offset to the CacheIndex. |
Type Parameters
Name | Description |
---|---|
T |
SetRaw(Single, CacheIndex, Int32)
Sets raw float data at specified index.
Declaration
public void SetRaw(float val, CacheIndex index, int offset = 0)
Parameters
Type | Name | Description |
---|---|---|
Single | val | Raw float data. |
CacheIndex | index | CacheIndex value. |
Int32 | offset | Offset to the CacheIndex. |