Class FastBufferExtensions
Tells the Netcode how to serialize and deserialize our custom type.
Inherited Members
Namespace: DocumentationCodeSamples
Assembly: Unity.Netcode.Editor.Tests.dll
Syntax
public static class FastBufferExtensions
Methods
ReadValueSafe(FastBufferReader, out Health)
Extension method to override the de-serialization for a custom type.
Declaration
public static void ReadValueSafe(this FastBufferReader reader, out Health health)
Parameters
| Type | Name | Description |
|---|---|---|
| FastBufferReader | reader | Buffer to read values from. |
| Health | health | The type to customize or override. |
WriteValueSafe(FastBufferWriter, in Health)
Extension method to override the serialization for a custom type.
Declaration
public static void WriteValueSafe(this FastBufferWriter writer, in Health health)
Parameters
| Type | Name | Description |
|---|---|---|
| FastBufferWriter | writer | Buffer to write values into. |
| Health | health | The type to customize or override. |