GetOrCreate
Creates a shared static data for the specified context (usable from both C# and HPC#)
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: Unity.Burst
- Assembly: UnityEngine.BurstModule
GetOrCreate<T>(uint)
Creates a shared static data for the specified context (usable from both C# and HPC#)
public static SharedStatic<T> GetOrCreate<TContext>(uint alignment = 0)
Parameters
Optional alignment
Returns
Type | Description |
|---|---|
| SharedStatic<T> | A shared static for the specified context |
GetOrCreate<T, U>(uint)
Creates a shared static data for the specified context and sub-context (usable from both C# and HPC#)
public static SharedStatic<T> GetOrCreate<TContext, TSubContext>(uint alignment = 0)
Parameters
Optional alignment
Returns
Type | Description |
|---|---|
| SharedStatic<T> | A shared static for the specified context |
GetOrCreate(Type, uint)
Creates a shared static data for the specified context (reflection based, only usable from C#, but not from HPC#)
public static SharedStatic<T> GetOrCreate(Type contextType, uint alignment = 0)
Parameters
Returns
Type | Description |
|---|---|
| SharedStatic<T> | A shared static for the specified context |
GetOrCreate(Type, Type, uint)
Creates a shared static data for the specified context and sub-context (usable from both C# and HPC#)
public static SharedStatic<T> GetOrCreate(Type contextType, Type subContextType, uint alignment = 0)
Parameters
Returns
Type | Description |
|---|---|
| SharedStatic<T> | A shared static for the specified context |