void Init() { if (m_Initialized) { if (m_HostMigrationProperty == null) { // need to re-init. don't return } else { return; } } m_Initialized = true; m_Manager = target as NetworkMigrationManager; m_HostMigrationProperty = serializedObject.FindProperty("m_HostMigration"); m_ShowGUIProperty = serializedObject.FindProperty("m_ShowGUI"); m_OffsetXProperty = serializedObject.FindProperty("m_OffsetX"); m_OffsetYProperty = serializedObject.FindProperty("m_OffsetY"); m_ShowGUILabel = new GUIContent("Show GUI", "Enable to display the default UI."); m_OffsetXLabel = new GUIContent("Offset X", "The horizonal offset of the GUI."); m_OffsetYLabel = new GUIContent("Offset Y", "The vertical offset of the GUI."); m_HostMigrationLabel = new GUIContent("Use Host Migration", "Enable to use host migration."); }
private void Init() { if (!this.m_Initialized || (this.m_HostMigrationProperty == null)) { this.m_Initialized = true; this.m_Manager = base.target as NetworkMigrationManager; this.m_HostMigrationProperty = base.serializedObject.FindProperty("m_HostMigration"); this.m_ShowGUIProperty = base.serializedObject.FindProperty("m_ShowGUI"); this.m_OffsetXProperty = base.serializedObject.FindProperty("m_OffsetX"); this.m_OffsetYProperty = base.serializedObject.FindProperty("m_OffsetY"); this.m_HostMigrationLabel = new GUIContent("Use Host Migration", "s."); } }
private void Init() { if (this.m_Initialized && this.m_HostMigrationProperty != null) { return; } this.m_Initialized = true; this.m_Manager = this.target as NetworkMigrationManager; this.m_HostMigrationProperty = this.serializedObject.FindProperty("m_HostMigration"); this.m_ShowGUIProperty = this.serializedObject.FindProperty("m_ShowGUI"); this.m_OffsetXProperty = this.serializedObject.FindProperty("m_OffsetX"); this.m_OffsetYProperty = this.serializedObject.FindProperty("m_OffsetY"); this.m_HostMigrationLabel = new GUIContent("Use Host Migration", "s."); }
public void SetupNetwork() { Assert.IsNotNull(NetworkManager.singleton.playerPrefab); NetworkManager.singleton.customConfig = true; NetworkManager.singleton.networkAddress = _ip; NetworkManager.singleton.networkPort = _port; NetworkManager.singleton.autoCreatePlayer = false; networkMigrManager = NetworkManager.singleton.gameObject.AddComponent <NetworkMigrationManager>(); Assert.IsTrue(NetworkManager.singleton.StartServer(), "Server was not started!"); NetworkManager.singleton.SetupMigrationManager(networkMigrManager); client = NetworkManager.singleton.StartClient(); client.Connect(_ip, _port); Assert.IsNull(client.connection, "Client is not connected"); networkMigrManager.Initialize(client, NetworkManager.singleton.matchInfo); networkMigrManager.SendPeerInfo(); }
public void SetupNetwork() { netManagerObj = new GameObject(); networkManager = netManagerObj.AddComponent <NetworkManager>(); networkManager.playerPrefab = Resources.Load("PlayerGameObject", typeof(GameObject)) as GameObject; Assert.IsNotNull(networkManager.playerPrefab); networkManager.customConfig = true; networkManager.networkAddress = _ip; networkManager.networkPort = _port; networkManager.autoCreatePlayer = false; networkMigrManager = netManagerObj.AddComponent <NetworkMigrationManager>(); Assert.IsTrue(networkManager.StartServer(), "Server was not started!"); networkManager.SetupMigrationManager(networkMigrManager); client = networkManager.StartClient(); client.Connect(_ip, _port); Assert.IsNull(client.connection, "Client is not connected"); networkMigrManager.Initialize(client, networkManager.matchInfo); networkMigrManager.SendPeerInfo(); }
void Init() { if (m_Initialized) { if (m_HostMigrationProperty == null) { // need to re-init. don't return } else { return; } } m_Initialized = true; m_Manager = target as NetworkMigrationManager; m_HostMigrationProperty = serializedObject.FindProperty("m_HostMigration"); m_ShowGUIProperty = serializedObject.FindProperty("m_ShowGUI"); m_OffsetXProperty = serializedObject.FindProperty("m_OffsetX"); m_OffsetYProperty = serializedObject.FindProperty("m_OffsetY"); m_HostMigrationLabel = new GUIContent("Use Host Migration", "s."); }
public new void SetupMigrationManager(NetworkMigrationManager manager) { throw new NotImplementedException(); }