Class CommonContextAPI
Inheritance
CommonContextAPI
Syntax
public static class CommonContextAPI
Methods
EmitMessage<TContext, T, TNodeDefinition>(ref TContext, MessageOutput<TNodeDefinition, T>, T)
Emit a message from yourself on a port. Everything connected to it will receive your message.
Declaration
public static void EmitMessage<TContext, T, TNodeDefinition>(this ref TContext self, MessageOutput<TNodeDefinition, T> port, in T msg)
where TContext : struct, IContext<TContext> where TNodeDefinition : NodeDefinition
Parameters
Type |
Name |
Description |
TContext |
self |
|
MessageOutput<TNodeDefinition, T> |
port |
|
T |
msg |
|
Type Parameters
Name |
Description |
TContext |
|
T |
|
TNodeDefinition |
|
EmitMessage<TContext, T, TNodeDefinition>(ref TContext, PortArray<MessageOutput<TNodeDefinition, T>>, Int32, T)
Emit a message from yourself on a port array. Everything connected to it will receive your message.
Declaration
public static void EmitMessage<TContext, T, TNodeDefinition>(this ref TContext self, PortArray<MessageOutput<TNodeDefinition, T>> port, int arrayIndex, in T msg)
where TContext : struct, IContext<TContext> where TNodeDefinition : NodeDefinition
Parameters
Type Parameters
Name |
Description |
TContext |
|
T |
|
TNodeDefinition |
|
Exceptions
RegisterForUpdate<TContext>(ref TContext)
Declaration
public static void RegisterForUpdate<TContext>(this ref TContext self)
where TContext : struct, IContext<TContext>
Parameters
Type |
Name |
Description |
TContext |
self |
|
Type Parameters
Name |
Description |
TContext |
|
Exceptions
RemoveFromUpdate<TContext>(ref TContext)
Declaration
public static void RemoveFromUpdate<TContext>(this ref TContext self)
where TContext : struct, IContext<TContext>
Parameters
Type |
Name |
Description |
TContext |
self |
|
Type Parameters
Name |
Description |
TContext |
|
Exceptions
SetKernelBufferSize<TContext, TGraphKernel>(ref TContext, TGraphKernel)
Declaration
[Obsolete("Renamed to UpdateKernelBuffers (RemovedAfter 2021-01-19)")]
public static void SetKernelBufferSize<TContext, TGraphKernel>(this ref TContext self, in TGraphKernel requestedSize)
where TContext : struct, IContext<TContext> where TGraphKernel : struct, IGraphKernel
Parameters
Type |
Name |
Description |
TContext |
self |
|
TGraphKernel |
requestedSize |
|
Type Parameters
Name |
Description |
TContext |
|
TGraphKernel |
|
UpdateKernelBuffers<TContext, TGraphKernel>(ref TContext, TGraphKernel)
Declaration
public static void UpdateKernelBuffers<TContext, TGraphKernel>(this ref TContext self, in TGraphKernel requestedSize)
where TContext : struct, IContext<TContext> where TGraphKernel : struct, IGraphKernel
Parameters
Type |
Name |
Description |
TContext |
self |
|
TGraphKernel |
requestedSize |
|
Type Parameters
Name |
Description |
TContext |
|
TGraphKernel |
|
UpdateKernelData<TContext, TKernelData>(ref TContext, TKernelData)
Updates the associated TKernelData
asynchronously,
to be available in a IGraphKernel in the next render.
Declaration
public static void UpdateKernelData<TContext, TKernelData>(this ref TContext self, in TKernelData data)
where TContext : struct, IContext<TContext> where TKernelData : struct, IKernelData
Parameters
Type |
Name |
Description |
TContext |
self |
|
TKernelData |
data |
|
Type Parameters
Name |
Description |
TContext |
|
TKernelData |
|
UploadRequest<TContext, T>(ref TContext, NativeArray<T>, BufferUploadMethod)
Declaration
public static Buffer<T> UploadRequest<TContext, T>(this ref TContext self, NativeArray<T> inputMemory, BufferUploadMethod method = BufferUploadMethod.Copy)
where TContext : struct, IContext<TContext> where T : struct
Parameters
Returns
Type Parameters
Name |
Description |
TContext |
|
T |
|