Delegate LogWriterUtils.OutputWriterHandler
Defines a delegate to handle writing the field data for context data structs.
Namespace: Unity.Logging
Syntax
public delegate LogWriterUtils.ContextWriteResult OutputWriterHandler(ref FormatterStruct formatter, ref UnsafeText outputUnsafeText, ref BinaryParser mem, IntPtr memAllocator, ref ArgumentInfo holeInfo);
Parameters
Type | Name | Description |
---|---|---|
FormatterStruct | formatter | Formatter that should be used to populate output text |
UnsafeText | outputUnsafeText | Reference to a UnsafeListString object to which the delegate writes the struct's data. |
BinaryParser | mem | Pointer + size of data to parse |
IntPtr | memAllocator | Memory manager that owns the binary data |
ArgumentInfo | holeInfo | Hole setup, like format specifiers |
Returns
Type | Description |
---|---|
LogWriterUtils.ContextWriteResult | Value indicating delegate successfully handled the data or not. |
Remarks
The LogWriterUtils calls into these delegates in order to write the struct data to the output string. Delegates can be added or removed from the active list of handlers by calling AddOutputHandler(LogWriterUtils.OutputWriterHandler, Boolean) and RemoveOutputHandler(IntPtr) respectively. By default, source generation will produce the output handlers and add the delegates to the handle list.
NOTE: Burst FunctionPointers only support delegates with primitive parameter types; structs cannot be passed, even by reference.