NetSerializerSubscribeReusableT, TUserData Method (ActionT, TUserData) |
LiteNetLib |
Register and subscribe to packet receive event
This metod will overwrite last received packet class on receive (less garbage)
Namespace: LiteNetLib.Utils
Assembly: LiteNetLib (in LiteNetLib.dll) Version: 1.0.0.0
Syntax
C#
public void SubscribeReusable<T, TUserData>( Action<T, TUserData> onReceive ) where T : class, new()
Parameters
- onReceive
- Type: SystemActionT, TUserData
event that will be called when packet deserialized with ReadPacket method
Type Parameters
- T
[Missing <typeparam name="T"/> documentation for "M:LiteNetLib.Utils.NetSerializer.SubscribeReusable``2(System.Action{``0,``1})"]
- TUserData
[Missing <typeparam name="TUserData"/> documentation for "M:LiteNetLib.Utils.NetSerializer.SubscribeReusable``2(System.Action{``0,``1})"]
See Also