SDK Update Guide
General Updates
After an sdk upgrade a bake process will be initiated automatically by the sdk to make sure the baked scripts are up to date.
If you run into any compilation or runtime errors in coherence code after the update these steps might help resolve the issue:
1) Go to coherence -> Schema and Baking -> Bake schemas (Safe Mode)
This will generate baked skeleton scripts which will compile but not work at runtime.
2) Go to coherence -> Schema and Baking -> Bake schemas
To fully generate the baked code (This can also be done via any of the other baking options).
3) This process should handle old bindings which are different on the updated version. If the errors persist check the bindings window for the relevant prefab to make sure they are set up properly then perform steps 1 and 2 again. This also makes sure old baked components are removed (these are now added at runtime).
SDK Upgrade 0.4.x -> 0.5.0
Notable api changes include:
commands are now called like so:
sync.SendCommand<ComponentType>("CommandMethodName", MessageTarget.All);
For example:
Notice the MessageTarget parameter and generic type argument which might be missing in the version you were using before.
Method parameters should be added after the MessageTarget parameter.
Notice the MessageTarget must be set for command methods in the Bindings window as well. If this is not set up in accordance with the way the method is called at runtime the command will not go through and a warning will be given about improper routing.
SDK Upgrade 0.5.x -> 0.7.0
Rooms and Worlds
coherence now works with either rooms or worlds. These architectures replace the old system and are meant for different usages. To learn more check out the documentation about Rooms and Worlds.
The connect dialogs have changed to reflect this and must now be used in accordance to the specific projects needs. The new Sample UI includes both connect dialogs.
Any code that was using the old connect dialog will need to be updated in accordance.
API
Notable api changes include:
Grabbing a monobridge from MonoBridgeStore
has changed, now also requiring a component reference:
The PlayResolver
now uses Tasks instead of callbacks. This is bound to affect projects which address the PlayResolver API directly. For the updated api take a look at Rooms API or Worlds API.
Prefabs
There have been cases where this version upgrade has broken certain properties of prefabs. It is advised to make sure all prefabs are set up correctly, especially their bindings.
Component actions have been added and can be found in the bindings editor. These handy options make it easier to set up changes needed to prefabs when instantiated locally and remotely. The bindings editor has also been improved to show variables, methods and component action in different tabs.
Other settings of CoherenceSync have changed as well, removing some settings, adding others and regrouping them in the editor.
The events exposed in the CoherenceSync have changed as well.
For a detailed documentation of the updated CoherenceSync component see CoherenceSync.
CLI Tools
The CLI tools have been updated, especially the ones that handle simulators. To learn more about this see CLI Utilities.
Last updated