Data Serialization
Serialization and deserialization of data for the purpose of sending it across the network.
public class PlayerStat
{
public string Name;
public int Level;
[ExcludeSerialization]
public int Victories;
}
[ServerRpc]
public void RpcPlayerStats(PlayerStat stats){}public class Stat
{
public float Health;
}
public class MonsterStat : Stat
{
public string Name;
public int Level;
}The ExcludeSerialization attribute
Last updated