Upgrading to coherence Unity SDK 0.9.0
Notable API changes include:
Coherence.Networkis removed now.OnConnectedandOnDisconnectedevents are moved toIClientand have changed a signature:
private void OnEnable()
{
if (!BridgeStore.TryGetBridge(gameObject.scene, out CoherenceBridge Bridge))
return;
client = Bridge.Client;
client.OnConnected += OnConnect;
client.OnDisconnected += OnDisconnect;
}
private void OnDisable()
{
client.OnConnected -= OnConnect;
client.OnDisconnected -= OnDisconnect;
}
private void OnConnect(ushort u)
{
onConnect.Invoke();
}
private void OnDisconnect(ConnectionCloseReason reason)
{
onDisconnect.Invoke();
}BridgeStore.GetBridgeis now obsolete, and will be replaced withBridgeStore.TryGetBridge.
BridgeStore.TryGetBridge(gameObject.scene, out Bridge);CoherenceSync.isSimulatedis now obsolete, and will be replaced withCoherenceSync.HasStateAuthority.CoherenceSync.RequestAuthorityis now obsolete, and will be replaced withCoherenceSync.RequestAuthority(AuthorityType).
CLI Tools
The CLI tools have been updated, especially the ones that handle Simulators. To learn more about this, see CLI utilities.
Last updated
Was this helpful?

