public void SetupNetworkClient() { SetupClient(); playerGO2 = new GameObject(); playerGO2.AddComponent <NetworkIdentity>(); behavior2 = playerGO2.AddComponent <SampleBehavior>(); flags = playerGO2.AddComponent <Flags>(); }
public IEnumerator SetupNetworkServer() => RunAsync(async() => { SetupServer(); await manager.StartServer(); playerGO = new GameObject(); playerGO.AddComponent <NetworkIdentity>(); behavior = playerGO.AddComponent <SampleBehavior>(); flags = playerGO.AddComponent <Flags>(); });