diff --git a/Runtime/HumanoidFree/Scripts/Networking/HumanoidNetworking.cs b/Runtime/HumanoidFree/Scripts/Networking/HumanoidNetworking.cs index 0ee52b8..823706e 100644 --- a/Runtime/HumanoidFree/Scripts/Networking/HumanoidNetworking.cs +++ b/Runtime/HumanoidFree/Scripts/Networking/HumanoidNetworking.cs @@ -191,6 +191,8 @@ namespace Passer.Humanoid { bw.Write(name); bw.Write(avatarPrefabName); bw.Write(physics); + if (possessionLocation == null) + possessionLocation = ""; bw.Write(possessionLocation); #if RemoteAvatarBundles bw.Write(remoteAvatarBundleSize); @@ -1470,7 +1472,7 @@ namespace Passer.Humanoid { public ulong nwId; public byte humanoidId; public string avatarPrefabName; - public string possessionLocation; + public string possessionLocation = ""; public ChangeAvatar() { } public ChangeAvatar(HumanoidControl humanoid, string avatarPrefabName, string possessionLocation) { @@ -1488,6 +1490,8 @@ namespace Passer.Humanoid { bw.Write(nwId); bw.Write(humanoidId); bw.Write(avatarPrefabName); + if (possessionLocation == null) + possessionLocation = ""; bw.Write(possessionLocation); byte[] data = ms.ToArray(); @@ -1502,6 +1506,8 @@ namespace Passer.Humanoid { humanoidId = br.ReadByte(); avatarPrefabName = br.ReadString(); possessionLocation = br.ReadString(); + if (possessionLocation == "") + possessionLocation = null; } // This is the same code as in the base class IMessage