示例#1
0
 private static void Initialize(BoltNetworkModes modes, UdpEndPoint endpoint, BoltConfig config)
 {
     BoltNetworkInternal.DebugDrawer   = new UnityDebugDrawer();
     BoltNetworkInternal.UsingUnityPro = true;
     if (BoltLauncher.< > f__mg$cache0 == null)
     {
         BoltLauncher.< > f__mg$cache0 = new Func <int, string>(BoltLauncher.GetSceneName);
     }
     BoltNetworkInternal.GetSceneName = BoltLauncher.< > f__mg$cache0;
     if (BoltLauncher.< > f__mg$cache1 == null)
     {
         BoltLauncher.< > f__mg$cache1 = new Func <string, int>(BoltLauncher.GetSceneIndex);
     }
     BoltNetworkInternal.GetSceneIndex = BoltLauncher.< > f__mg$cache1;
     if (BoltLauncher.< > f__mg$cache2 == null)
     {
         BoltLauncher.< > f__mg$cache2 = new Func <List <STuple <BoltGlobalBehaviourAttribute, Type> > >(BoltLauncher.GetGlobalBehaviourTypes);
     }
     BoltNetworkInternal.GetGlobalBehaviourTypes = BoltLauncher.< > f__mg$cache2;
     if (BoltLauncher.< > f__mg$cache3 == null)
     {
         BoltLauncher.< > f__mg$cache3 = new Action(BoltNetworkInternal_User.EnvironmentSetup);
     }
     BoltNetworkInternal.EnvironmentSetup = BoltLauncher.< > f__mg$cache3;
     if (BoltLauncher.< > f__mg$cache4 == null)
     {
         BoltLauncher.< > f__mg$cache4 = new Action(BoltNetworkInternal_User.EnvironmentReset);
     }
     BoltNetworkInternal.EnvironmentReset = BoltLauncher.< > f__mg$cache4;
     BoltNetworkInternal.__Initialize(modes, endpoint, config, BoltLauncher.CreateUdpPlatform(), null);
 }
示例#2
0
    static void Initialize(BoltNetworkModes modes, UdpEndPoint endpoint, BoltConfig config)
    {
        BoltNetworkInternal.DebugDrawer = new BoltInternal.UnityDebugDrawer();

#if UNITY_PRO_LICENSE
        BoltNetworkInternal.UsingUnityPro = true;
#else
        BoltNetworkInternal.UsingUnityPro = false;
#endif

#if BOLT_UPNP_SUPPORT
        BoltNetworkInternal.NatCommunicator = new BoltInternal.StandaloneNatCommunicator();
#endif

        BoltNetworkInternal.GetSceneName            = GetSceneName;
        BoltNetworkInternal.GetSceneIndex           = GetSceneIndex;
        BoltNetworkInternal.GetGlobalBehaviourTypes = GetGlobalBehaviourTypes;
        BoltNetworkInternal.EnvironmentSetup        = BoltInternal.BoltNetworkInternal_User.EnvironmentSetup;
        BoltNetworkInternal.EnvironmentReset        = BoltInternal.BoltNetworkInternal_User.EnvironmentReset;
        BoltNetworkInternal.__Initialize(modes, endpoint, config, CreateUdpPlatform());
    }