public void Init(RuntimeConfig cfg, bool threaded = true) { StaticCompositeResolver.Instance.Register( MessagePack.Resolvers.ClientAppResolver.Instance, MessagePack.Resolvers.FenixRuntimeResolver.Instance, MessagePack.Resolvers.SharedResolver.Instance, MessagePack.Unity.UnityResolver.Instance, MessagePack.Unity.Extension.UnityBlitResolver.Instance, MessagePack.Unity.Extension.UnityBlitWithPrimitiveArrayResolver.Instance, MessagePack.Resolvers.StandardResolver.Instance ); Environment.SetEnvironmentVariable("AppName", "Client.App"); Global.Init(cfg, new Assembly[] { typeof(App).Assembly }); host = Host.CreateClient(); if (threaded) { HostHelper.RunThread(host); } else { #if !CLIENT HostHelper.Run(host); #else #endif } }
public void Init(bool threaded = true) { Environment.SetEnvironmentVariable("AppName", "Client.App"); Global.Init(new Assembly[] { typeof(App).Assembly }); host = Host.CreateClient(); if (threaded) { HostHelper.RunThread(host); } else { #if !UNITY_5_3_OR_NEWER HostHelper.Run(host); #else #endif } }