Method AddOutputHandler
AddOutputHandler(OutputWriterHandler, bool)
Adds a delegate to process and generate logging output strings for a set of context structs.
Declaration
public static IntPtr AddOutputHandler(LogWriterUtils.OutputWriterHandler handler, bool isBurstable = false)
Parameters
Type | Name | Description |
---|---|---|
Log |
handler | Log |
bool | isBurstable | True to Burst compile the handler and false if it's not Burst compatible. |
Returns
Type | Description |
---|---|
Int |
A token referencing this handler, used for removing the handler later. |
Remarks
This method is invoked by source generated code and generally shouldn't be used directly.
Since this method takes a delegate parameter, it's not Burst compatible itself. However, the method referenced by the delegate can be Burst compatible or not, depending on how it's implemented. If the handler method is Burst compatible, then pass true for isBurstable to Burst compile the handler, otherwise the handler always runs as managed code.