Show / Hide Table of Contents

Class SynchronizationManager

Manager for handling synchronisation between client and server instances.
Inheritance
object
SynchronizationManager
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Jotunn.Managers
Assembly: Jotunn.dll
Syntax
public class SynchronizationManager

Properties

Name Description
Instance Singleton instance
PlayerIsAdmin Clientside indicator if the current player has admin status on the current world, always true on local games

Methods

Name Description
AddInitialSynchronization(CustomRPC, Func<ZNetPeer, ZPackage>) Add a CustomRPC and a method for generating a ZPackage to the manager.
The RPC will be initiated on the server side after login to sync arbitrary data to the connecting client. The package is guaranteed to be received before the client's connection is fully established and the player loads into the world.
AddInitialSynchronization(CustomRPC, Func<ZPackage>) Add a CustomRPC and a method for generating a ZPackage to the manager.
The RPC will be initiated on the server side after login to sync arbitrary data to the connecting client. The package is guaranteed to be received before the client's connection is fully established and the player loads into the world.
RegisterCustomConfig(ConfigFile) Registers a non default config file for possible synchronisation with all clients. Entries still need the IsAdminOnly attribute in order to be synchronized.
The file path must be saved under the executing BepInEx config folder, see BepInEx.Paths.ConfigPath. This guarantees the same relative path for all clients.

Events

Name Description
OnAdminStatusChanged Event triggered after a clients admin status changed on the server
OnConfigurationSynchronized Event triggered after configuration has been synced on either the server or client
OnConfigurationWindowClosed Event triggered after the in-game configuration manager window is closed
OnSyncingConfiguration Event triggered before syncing configuration on either the server or client

Extension Methods

PrefabExtension.FixReferences(object)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾