コード例 #1
0
ファイル: App.cs プロジェクト: mao420430/Fenix
        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
            }
        }
コード例 #2
0
ファイル: App.cs プロジェクト: blessing512/Fenix
        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
            }
        }