LogoLogo
HomeOnline DashboardAPIDiscordForums
SDK 1.7 Preview
SDK 1.7 Preview
  • Welcome
  • Overview
    • Features
    • Roadmap
  • Getting started
    • Get the Unity SDK
    • Setup a project
      • 1. Scene setup
      • 2. Prefab setup
      • 3. Test your game locally
        • Local testing using builds
        • Local testing via Unity's Multiplayer Play Mode
        • Local testing via ParrelSync
      • 4. Test in the cloud
        • Deploy a Replication Server
        • Share builds
    • How to... ?
    • Single-player to multiplayer
    • Video tutorials
    • Samples and tutorials
      • Package samples
      • Sample Connection UIs
      • First Steps tutorial
        • 1. Basic syncing
          • 1.1 Animation parameters
          • 1.2 Sending commands
        • 2. Physics / Authority transfer
        • 3. Areas of interest
        • 4. Parenting entities
        • 5. Complex hierarchies
        • 6. Persistence
      • Campfire project
        • Game mechanics
        • Leveraging object pooling
        • Remote interactions: Chairs
        • Remote interactions: Trees
        • A unique object with complex state
        • Custom instantiation and destruction
        • Running a server-side NPC
        • Playing audio and particles
        • A simple text chat
      • Beginner's guide to networking
    • Troubleshooting
  • Manual
    • Unity Components
      • CoherenceSync
      • CoherenceBridge
      • CoherenceLiveQuery
      • CoherenceTagQuery
      • CoherenceGlobalQuery
      • CoherenceInput
      • CoherenceNode
      • PrefabSyncGroup
      • Order of execution
    • Networking state changes
      • Instantiate and Destroy Objects
      • Supported types
      • Messaging with Commands
      • Syncing child GameObjects
      • Animation
      • CoherenceSync references
      • [Sync] and [Command] Attributes
      • [OnValueSynced] Attribute
      • Creating your own syncable member
      • Custom Component Actions
      • Rigid Bodies
      • Interpolation
    • Authority
      • Authority transfer
      • Server-authoritative setup
    • Lifetime
      • Persistence
      • Uniqueness
      • Example: A global counter
    • Parenting network entities
      • Direct children CoherenceSyncs
      • Deeply-nested CoherenceSyncs
      • Nesting Prefabs at Edit time
    • Asset management
      • Instantiating from CoherenceSyncConfig
      • Instantiate via
      • Load via
    • Scene management
    • Multiple Connections within a Game Instance
    • Baking (code generation)
      • Conditional compilation
    • Replication Server
      • Rooms and Worlds
      • Replication Server API
    • Simulators (Servers)
      • Scripting: Client vs Simulator
      • Run local Simulators
      • World Simulators
      • Room Simulators
      • Advanced Simulator Authority
      • Simulator slugs
      • Build and Deploy
      • Command-line arguments
    • Client Connections
    • Optimization
      • Areas of Interest
      • Level of Detail (LOD)
      • Profiling
      • Simulation Frequency
    • Project Settings
    • Advanced topics
      • Big worlds
        • World Origin Shifting
        • Load balancing
      • Competitive games
        • Simulation Frame
        • Determinism, Prediction and Rollback
      • Team workflows
        • Version Control integration
        • Continuous Integration
      • Schema explained
        • Specification
        • Field settings
        • Archetypes
      • Code stripping
      • Replication Server CLI
      • Single-player gameplay
    • Scripting API
  • Hosting
    • Choosing where to host
    • coherence Cloud
      • Online Dashboard
      • Manage Worlds
      • Configure Rooms
      • Player Accounts
      • Game Services
        • Lobbies
        • Cloud Storage
        • Key-Value Store (Legacy)
      • APIs
        • Worlds
        • Rooms
        • Lobbies
        • Cloud Storage
        • Key-Value Store (Legacy)
    • Peer-to-peer
      • Implementing Client hosting
        • Steam Relay
        • Epic Online Services (EOS) Relay
        • Azure PlayFab Relay
  • Support
    • Release notes
    • Glossary
    • Unreal Engine support
    • WebGL support
    • ECS / DOTS support
    • Known issues
    • Upgrade guide
      • Upgrade 1.6 -> 1.7
      • Upgrade 1.5 -> 1.6
      • Upgrade 1.4 -> 1.5
      • Upgrade 1.3 -> 1.4
      • Upgrade 1.2 -> 1.3
      • Upgrade 1.1 -> 1.2
      • Upgrade 1.0 -> 1.1
      • Upgrade 0.10 -> 1.0
      • Upgrade 0.9 -> 0.10
    • Credit cost & pricing
    • Report a bug
Powered by GitBook
On this page
  • Baked code and Prefabs with missing scripts
  • CoherenceMonoBridge has been renamed to CoherenceBridge
  • CoherenceSyncConfigRegistry and removal of PrefabMapper
  • Changes to CoherenceSync lifetime in runtime
  • Play API deprecation
  • "No Domain Reload" Unity Editor option is now supported
  • CoherenceSync.OnNetworkedInstantiation and OnBeforeNetworkedInstantiation events behaviour change
  • Changes to the Client Connections system

Was this helpful?

Export as PDF
  1. Support
  2. Upgrade guide

Upgrade 0.10 -> 1.0

Was this helpful?

This page lists changes in coherence 1.0.0 version which might affect existing projects when upgrading from a 0.10.x version to 1.0.0.

Baked code and Prefabs with missing scripts

Version 1.0.0 includes breaking changes to the baked scripts, which means your current ones will cause compilation errors. It is recommended to delete your current baked scripts under Assets/coherence/baked before performing a coherence Unity SDK update.

For automatic migrations to run smoothly, we recommend not having any Prefab with missing component scripts that have the CoherenceSync component attached to it. These Prefabs will stop Unity from saving assets and automatic data migrations might get interrupted because of it.

CoherenceMonoBridge has been renamed to CoherenceBridge

There have been a number of updates to the old CoherenceMonoBridge, which have resulted in a rebranding of the component to CoherenceBridge.

If your custom scripts have references to the class CoherenceMonoBridge, you will have to rename all these references to CoherenceBridge.

The script asset GUID and the public API of the component remain unchanged, so asset references to CoherenceMonoBridge components should remain intact.

CoherenceSyncConfigRegistry and removal of PrefabMapper

In coherence 1.0.0, we have revamped our asset management systems to make them more scalable and customizable, both in Editor and in runtime. Read more about the new implementations and the possibilities in the article.

Upon upgrading the SDK, a new CoherenceSyncConfigRegistry asset will be automatically created in Assets/coherence/CoherenceSyncConfigRegistry.asset and populated with sub-assets for each of your Prefabs that have a CoherenceSync component attached.

If the automatic migration completed successfully, you can browse all your networked Prefabs in the new CoherenceSync Objects window found under the coherence menu item:

If something has gone wrong during the automatic migration, you can restart the process by deleting the current CoherenceSyncConfigRegistry asset, and selecting the Reimport coherence Assets option under the coherence menu item. This will automatically create a config entry for each of your CoherenceSync Prefabs:

Changes to CoherenceSync lifetime in runtime

In previous versions of coherence, Prefabs with the CoherenceSync component would be automatically synced over the network in the Start method, and they would stop being synced only when destroyed. This prevented us from supporting things like object pooling and reusing the same CoherenceSync instance to represent different network entities across its lifetime.

As a result, CoherenceSync instances are now automatically synced and unsynced with the network in the OnEnable and OnDisable methods of the MonoBehaviour. This means you can disable the GameObject instance in the hierarchy and it will stop being synced, you can also keep the local visual representation by only disabling the CoherenceSync component.

This change may or may not affect your current project. If you wish to use the new Object Pooling feature (or make your own!), you might need to upgrade your custom components logic to accommodate the new paradigm.

Play API deprecation

The Play API was the public API we offered to connect with your coherence Cloud project in runtime. It has been deprecated in favor of a new non-static API called CloudService, with separation of a ReplicationServerRoomsService so you can talk to self-hosted Room Replication Servers with a lot more customization and without having to use the coherence Cloud.

The Play API includes the following classes:

  • PlayResolver

  • PlayClient

  • Play

  • WorldsResolverClient

  • RoomsResolverClient

If you were using PlayResolver static calls, you can now access CloudService instance from CoherenceBridge instead, and you will be able to use the CloudService.Worlds or CloudService.Rooms instances to fetch Worlds or to create, delete or fetch available Rooms respectively.

CloudService offers callback-based methods and an async variant for all of the available requests.

"No Domain Reload" Unity Editor option is now supported

No Domain Reload is a Unity Editor option that allows users to enter Play mode very fast without having to recompile all your code. This wasn't properly supported in earlier versions of coherence, but now it is!

You can find this option under Edit > Project Settings > Editor > Enter Play Mode Settings.

Keep in mind that you might have custom implementations in your project that prevents you from using this option successfully, the most common are:

  • Static state and initializers: since your app domain isn't reloaded when entering Play mode, that means static contexts aren't reset either, which might cause issues.

  • SerializeReference instances: similar to the previous one, SerializeReference instances won't be recreated when entering Play mode, so you will have to make sure that the state of SerializeReference instances are properly reset on application quit.

CoherenceSync.OnNetworkedInstantiation and OnBeforeNetworkedInstantiation events behaviour change

In previous releases of coherence, this event would be fired strictly for CoherenceSync Prefab instances created by coherence, which means it would be fired for instances you didn't have authority over.

In 1.0, this event will be fired for every instance of CoherenceSync that starts being synchronized over the network.

If you wish to hook behavior to non-authority instances, please use the OnStateRemote event instead, which is fired when a CoherenceSync instance is non-authoritative.

Changes to the Client Connections system

In 1.0, there has been two major changes to Client Connection instances.

You can learn more about the CoherenceSync lifetime cycle in the page.

You can learn more about the Cloud Service API under the section.

Client Connection instances now live in the DontDestroyOnLoad scene. Since now we support , and Client Connections instances are managed by coherence, they need to survive the destruction of the Scene they were in.

References to the Client Connection Prefab in the CoherenceBridge Component have been changed from hard referencing a Unity Prefab, to referencing a asset. If you were using a Unity Prefab reference, it still exists serialized but is deprecated. If you wish to stop using the Unity Prefab reference, please delete the CoherenceBridge Component and add it again.

Order Of Execution
Unity Cloud Service
Scene Transitioning
CoherenceSyncConfig
📁
Asset Management
New CoherenceSync Objects window
Reimport coherence Assets menu item