Click or drag to resize

NetPacketProcessorSubscribeReusableT(ActionT) Method

Register and subscribe to packet receive event This method will overwrite last received packet class on receive (less garbage)

Namespace: LiteNetLib.Utils
Assembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.2.1.0 (2026.2.1.0)
Syntax
C#
public void SubscribeReusable<T>(
	Action<T> onReceive
)
where T : class, new()

Parameters

onReceive  ActionT
event that will be called when packet deserialized with ReadPacket method

Type Parameters

T
Exceptions
ExceptionCondition
InvalidTypeExceptionT's fields are not supported, or it has no fields
See Also