◆ Deserialize< T >() [1/2]
T LiteNetLib.Utils.NetSerializer.Deserialize< T > |
( |
NetDataReader |
reader | ) |
|
|
inline |
Reads packet with known type.
- Parameters
-
reader | NetDataReader with packet |
- Returns
- Returns packet if packet in reader is matched type
- Exceptions
-
InvalidTypeException | T 's fields are not supported, or it has no fields |
◆ Deserialize< T >() [2/2]
bool LiteNetLib.Utils.NetSerializer.Deserialize< T > |
( |
NetDataReader |
reader, |
|
|
T |
target |
|
) |
| |
|
inline |
Reads packet with known type (non alloc variant)
- Parameters
-
reader | NetDataReader with packet |
target | Deserialization target |
- Returns
- Returns true if packet in reader is matched type
- Exceptions
-
InvalidTypeException | T 's fields are not supported, or it has no fields |
◆ RegisterNestedType< T >() [1/3]
void LiteNetLib.Utils.NetSerializer.RegisterNestedType< T > |
( |
| ) |
|
|
inline |
Register custom property type.
- Template Parameters
-
T | INetSerializable structure |
- Type Constraints
-
T | : | struct | |
T | : | INetSerializable | |
◆ RegisterNestedType< T >() [2/3]
void LiteNetLib.Utils.NetSerializer.RegisterNestedType< T > |
( |
Action< NetDataWriter, T > |
writer, |
|
|
Func< NetDataReader, T > |
reader |
|
) |
| |
|
inline |
Register custom property type.
- Template Parameters
-
- Parameters
-
writer | custom type writer |
reader | custom type reader |
◆ RegisterNestedType< T >() [3/3]
void LiteNetLib.Utils.NetSerializer.RegisterNestedType< T > |
( |
Func< T > |
constructor | ) |
|
|
inline |
Register custom property type.
- Template Parameters
-
- Type Constraints
-
T | : | class | |
T | : | INetSerializable | |
◆ Serialize< T >() [1/2]
void LiteNetLib.Utils.NetSerializer.Serialize< T > |
( |
NetDataWriter |
writer, |
|
|
T |
obj |
|
) |
| |
|
inline |
Serialize object to NetDataWriter (fast)
- Parameters
-
writer | Serialization target NetDataWriter |
obj | Object to serialize |
- Exceptions
-
InvalidTypeException | T 's fields are not supported, or it has no fields |
◆ Serialize< T >() [2/2]
byte[] LiteNetLib.Utils.NetSerializer.Serialize< T > |
( |
T |
obj | ) |
|
|
inline |
Serialize object to byte array.
- Parameters
-
- Returns
- byte array with serialized data
The documentation for this class was generated from the following file:
- C:/Transhuman/S2/Assets/Plugins/Teal-Net/Plugins/LiteNetLib/Utils/NetSerializer.cs