Hello, I am having an issue where after I connect to the room in my game using the connect dialog, I am getting some errors occurring at every Update() and FixedUpdate() call related to the InternalClient.NetworkTime within the CoherenceMonoBridge script. I’m not sure if the first error is unrelated, could be, I am pretty new to Unity as well so its very possible I just did something simple wrong.
Here are the errors that are popping up:
Exception: String too long. Max length: 63 bytes.
Coherence.Serializer.OutProtocolBitStream.WriteShortString (System.String s) (at Library/PackageCache/io.coherence.sdk@0.10.14/Coherence.Serializer/OutProtocolBitStream.cs:105)
NullReferenceException: Object reference not set to an instance of an object
Coherence.Flux.Flux.SendPacket (Coherence.Brook.IOutOctetStream stream) (at Library/PackageCache/io.coherence.sdk@0.10.14/Coherence.Transport/Flux/Flux.cs:44)
Coherence.Transport.UdpTransport.Send (Coherence.Brook.IOutOctetStream stream) (at Library/PackageCache/io.coherence.sdk@0.10.14/Coherence.Transport/UdpTransport.cs:96)
…
Coherence.Toolkit.CoherenceMonoBridge.ReceiveFromNetworkAndUpdateTime () (at Library/PackageCache/io.coherence.sdk@0.10.14/Coherence.Toolkit/CoherenceMonoBridge.cs:617)
Coherence.Toolkit.CoherenceMonoBridge.Update () (at Library/PackageCache/io.coherence.sdk@0.10.14/Coherence.Toolkit/CoherenceMonoBridge.cs:596)
And if I follow the error codes, I end up here in the CoherenceMonoBridge script:
private void Update()
{
ReceiveFromNetworkAndUpdateTime();
}
private void FixedUpdate()
{
ReceiveFromNetworkAndUpdateTime();
}
/// <summary>
/// Handles <see cref="NetworkTime" /> update and data receiving through <see cref="IClient.UpdateReceiving" />. Sending
/// is handled by the <see cref="CoherenceMonoBridgeSender" />.
/// </summary>
private void ReceiveFromNetworkAndUpdateTime()
{
if (InternalClient != null)
{
InternalClient.NetworkTime.LastPing = InternalClient.Ping;
#if !ENABLE_INPUT_SYSTEM
FixedUpdateInput.Update();
#endif
InternalClient.UpdateReceiving();
InputManager.Update();
InternalClient.NetworkTime.MultiClientMode = !controlTimeScale;
InternalClient.NetworkTime.AccountForPing = adjustSimulationFrameByPing;
InternalClient.NetworkTime.Step(Time.timeAsDouble);
if (controlTimeScale)
{
Time.timeScale = InternalClient.NetworkTime.NetworkTimeScale;
}
}
}
Am I doing something wrong here with setup or configuration, or the way I am testing in the editor, or is this a known bug? Happy to provide more info if needed, just wanted to see if it was a quick fix… Thanks!