LogoLogo
⚠️ Outdated documentationGo to LatestHomeAPI
SDK 0.10
SDK 0.10
  • Welcome
  • Overview
    • What is coherence?
    • How does coherence work?
    • Rooms and Worlds
    • Features and Roadmap
    • Release Notes
    • Known Issues and Troubleshooting
  • Learning coherence
    • First Steps tutorial
      • 1. Basic syncing
        • 1.2. Animation parameters
        • 1.3. Sending commands
      • 2. Physics / Authority transfer
      • 3. Areas of interest
      • 4. Parenting entities
      • 5. Complex hierarchies
      • 6. Persistence
    • How to network...
      • Racing
      • Turn-based
      • First-Person Shooter
      • MMO
      • Fighting
  • Get started
    • Installation
    • Scene Setup
      • Sample UI
    • Prefab Setup: CoherenceSync
    • Local Development
      • Tips and Recommendations
    • coherence Cloud
      • Create a Free Account
      • Deploy a Replication Server
      • Share Builds
  • coherence SDK for Unity
    • Components
      • CoherenceSync
      • CoherenceMonoBridge
      • CoherenceLiveQuery
      • CoherenceTagQuery
      • Order of execution
    • Networking State Changes
      • Messaging with Commands
      • Hierarchies & Child Objects
        • Child GameObjects
        • Child CoherenceSyncs
        • Deep Child CoherenceSyncs
      • Animations
      • CoherenceSync References
      • [Sync] and [Command] Attributes
      • [OnValueSynced] Attribute
      • Supported Types
      • Player Name (Sample UI)
    • Baking (Code Generation)
    • Authority
      • Authority transfer
      • Server-authoritative setup
    • Lifetime
      • Persistence
      • Example – a global counter
    • Optimization
      • Simulation Frequency
      • Areas of Interest
      • Level of Detail (LOD)
    • Interpolation
    • Settings
    • Simulation Frame
    • Replication Server
    • Simulators
      • Scripting: Client vs Simulator
      • Local Development
      • World Simulators
      • Room Simulators
      • Simulator Slugs
      • Multi-Room Simulators
      • Build and Publish
      • Command-line arguments
      • Load Balancing
      • Network Connectivity
    • Client Connections
    • Rollback Networking Support
    • Floating Origin
    • CLI
  • coherence API
    • Worlds
    • Rooms
    • PlayResolver
    • DescriptorProvider
  • Developer Portal
    • Overview
    • Dashboard
    • Worlds
    • Rooms
    • Game Services
      • Account
      • Key-Value Store
      • API
        • Game account
        • Key-value store
  • Schema explained
    • Overview
    • Specification
    • Field settings
    • Archetypes
  • Additional resources
    • Community
    • SDK Upgrade Guide
    • Video Tutorials
    • Quick Samples
    • Continuous Integration
    • Unreal Engine Support
    • WebGL Support
    • Peer-to-Peer Support (P2P)
    • Pricing
    • SLA
    • Glossary
Powered by GitBook
On this page
  • General updates
  • SDK Upgrade 0.7.x (0.8.x) -> 0.9.0

Was this helpful?

Export as PDF
  1. Additional resources

SDK Upgrade Guide

Last updated 2 years ago

Was this helpful?

Any new version of coherence should install automatically in the Unity Editor's Package Manager. To check the version, open up coherence > coherence Hub and the version should be displayed at the top.

General updates

  • After an SDK upgrade, bake process will be initiated automatically by the SDK to make sure the baked scripts are up to date.

  • If you were using the old manual code generation system and you run into any compilations or runtime errors in coherence code after the update, you need to delete Assets/coherence/baked folder. These steps might help resolve the issue:

If you were using an old code generation system and you run into any compilation or runtime errors in coherence code after the update, you need to delete Assets/coherence/baked folder and these steps might help resolve the issue:

1) Go to coherence > Bake

2) Go to Project settings > coherence > Gather Schema to fully generate the baked code (this can also be done via any of the other baking options). After that click Project settings > coherence > Bake.

3) This process should handle old bindings which are different from 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).

The 0.9 version introduces two new features:

SDK Upgrade 0.7.x (0.8.x) -> 0.9.0

  • Notable API changes include:

  1. Coherence.Network is removed now. OnConnected and OnDisconnected events are moved to IClient and have changed a signature:\

        private void OnEnable()
        {
            if (!MonoBridgeStore.TryGetBridge(gameObject.scene, out CoherenceMonoBridge monoBridge))
                return; 
            
            client = monoBridge.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();
        }

2. MonoBridgeStore.GetBridge is now obsolete, and will be replaced with MonoBridgeStore.TryGetBridge.

MonoBridgeStore.TryGetBridge(gameObject.scene, out monobridge);

3. CoherenceSync.isSimulated is now obsolete, and will be replaced with CoherenceSync.HasStateAuthority.

4. CoherenceSync.RequestAuthority is now obsolete, and will be replaced with CoherenceSync.RequestAuthority(AuthorityType).

CLI Tools

This will generate baked skeleton scripts which will compile but not work at runtime. If you still have compilation errors at this point, it's better to go into Safe mode and fix possible API upgrade issues, as detailed below, in .

You can update your CoherenceSync prefabs outside the Resources folder and use .

Source Generator system is introduced for Baking. You can read more on it .

For more information, see .

For detailed documentation of the updated CoherenceSync component, see .

The CLI tools have been updated, especially the ones that handle Simulators. To learn more about this, see .

Release Notes
CoherenceSync
CLI utilities
the second part of this article
PrefabMapper
here