sync persist id to prevent bugs on ownership change of spawned objects

main
Anton Franzluebbers 2024-07-05 18:55:10 -04:00
parent d02eddfe79
commit b8bac541f5
2 changed files with 9 additions and 4 deletions

View File

@ -8,7 +8,7 @@ using VelNet;
namespace VELConnect namespace VELConnect
{ {
public class VelNetPersist : NetworkComponent public class VelNetPersist : SyncState
{ {
private const float interval = 5f; private const float interval = 5f;
private double nextUpdate; private double nextUpdate;
@ -172,9 +172,14 @@ namespace VELConnect
method: "DELETE"); method: "DELETE");
} }
public override void ReceiveBytes(byte[] message) protected override void SendState(BinaryWriter binaryWriter)
{ {
throw new NotImplementedException(); binaryWriter.Write(persistId);
}
protected override void ReceiveState(BinaryReader binaryReader)
{
persistId = binaryReader.ReadString();
} }
} }
} }

View File

@ -1,7 +1,7 @@
{ {
"name": "edu.uga.engr.vel.vel-connect", "name": "edu.uga.engr.vel.vel-connect",
"displayName": "VEL-Connect", "displayName": "VEL-Connect",
"version": "5.0.3", "version": "5.0.4",
"unity": "2019.1", "unity": "2019.1",
"description": "Web-based configuration for VR applications", "description": "Web-based configuration for VR applications",
"keywords": [], "keywords": [],