NetPacketProcessorSubscribeNetSerializableT(ActionT, FuncT) Method |
Registers a callback for a packet type that implements
INetSerializable, using a custom constructor.
Namespace: LiteNetLib.UtilsAssembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.2.1.0 (2026.2.1.0)
Syntaxpublic void SubscribeNetSerializable<T>(
Action<T> onReceive,
Func<T> packetConstructor
)
where T : INetSerializable
Parameters
- onReceive ActionT
- The delegate to be executed when the packet is received.
- packetConstructor FuncT
- A function that returns a new instance of T.
Type Parameters
- T
- The type of the packet. Must implement INetSerializable.
See Also