Пример #1
0
 private void CreateVirtualClients()
 {
     for (int i = 0; i < VirtualPlayerCount; i++)
     {
         Neutron neutron = Neutron.Create(ClientMode.Virtual);
         Register(neutron);
         neutron.Connect();
     }
 }
Пример #2
0
        /// <summary>
        ///* Inicia a conexão, chamado automaticamente se "AutoStartConnection" é true;
        /// </summary>
        protected void Connect(int index = 0, int timeout = 3, Authentication authentication = null)
        {
#if !UNITY_SERVER || UNITY_EDITOR
            Neutron neutron = Neutron.Client ?? Neutron.Create();
            if (!neutron.IsConnected)
            {
                Register(neutron);
            }
            neutron.Connect(index, timeout, authentication);
#endif
        }