Assets/Plugins/Unity.DSPGraph/Runtime/DSPGraph.cs
/// <summary>
/// Adds an event handler to the <see cref="DSPNode"/> in DSPGraph. This callback is invoked asynchronously on the main thread after the DSPNode posts a matching event.
/// </summary>
/// <param name="handler"></param>
/// <typeparam name="TNodeEvent"></typeparam>
/// <returns>An event handler ID</returns>
Adds an event handler to the  in DSPGraph. This callback is invoked asynchronously on the main thread after the DSPNode posts a matching event.
Adds an event handler to the in DSPGraph . This callback is invoked asynchronously on the main thread after the DSPNode posts a matching event .
public int AddNodeEventHandler<TNodeEvent>(Action<DSPNode, TNodeEvent> handler) where TNodeEvent : unmanaged
        {
            if (handler == null)
                throw new ArgumentNullException(nameof(handler));
            NodeEventCallback callbackWrapper = new NodeEventWrapper<TNodeEvent>(handler).InvokeCallback;
            return RegisterNodeEventHandler<TNodeEvent>(GCHandle.Alloc(callbackWrapper));
        }
public int AddNodeEventHandler < TNodeEvent > ( Action < DSPNode , TNodeEvent > handler ) where TNodeEvent : unmanaged { if ( handler == null ) throw new ArgumentNullException ( nameof ( handler ) ) ; NodeEventCallback callbackWrapper = new NodeEventWrapper < TNodeEvent > ( handler ) . InvokeCallback ; return RegisterNodeEventHandler < TNodeEvent > ( GCHandle . Alloc ( callbackWrapper ) ) ; }
Adds an event handler to the  in DSPGraph.
Adds an event handler to the in DSPGraph .
An event handler ID
An event handler ID
handler
Action<DSPNode, TNodeEvent>
None
typeparam
None