3/29/2023 0 Comments Networkview unty![]() ![]() MyPlayerObject.GetComponent(Player_Manager).networkView.RPC("Client_PlayerAlive",RPCMode.Others) MyPlayerObject.GetComponent(Player_Manager).networkView.RPC("Client_PlayerAlive",RPCMode.All) MyPlayerObject.GetComponent(Player_Manager).ControllerTransform.rotation = rotation MyPlayerObject.GetComponent(Player_Manager).ControllerTransform.position = position GameObject.Find("Player_Health").guiText.text = "100" GameObject.Find(GroupNetworkPlayerName).GetComponent(MultiplayerManager).GetMPPlayer(player).PlayerHealth = 100 GameObject.Find(GroupNetworkPlayerName).GetComponent(MultiplayerManager).GetMPPlayer(player).PlayerIsAlive = true NetworkView.RPC("Client_SpawnPlayer",RPCMode.All,player,GameObject.Find("spawnpoint"+numberspawn).transform.position + Client_SpawnPlayer(player : NetworkPlayer, position : Vector3, rotation : Quaternion) Var numberspawn = Random.Range(1, Spawnpoints.Length +1) IfMatchStarted = Server_SpawnPlayer(player : NetworkPlayer) Spawnpoints = Client_ServerLoaded(started : boolean) If (Application.loadedLevelName = CurrentMap.MapLoadName & Network.isServer) NetworkView.RPC("Client_GetMultiplayerMatchSettings",player,CurrentMap.MapName,"","") NetworkView.RPC("Client_AddPlayerToList",player,pl.PlayerName,pl.PlayerNetwork) Var play : GameObject = Network.Instantiate(PlayerManagerPrefab,Vector3.zero, Quaternion.identity,5) as GameObject įunction OnPlayerConnected(player : NetworkPlayer) PlayerName = PlayerName + Random.Range(1,250) Server_PlayerJoinRequest(PlayerName,ayer) įunction Server_PlayerJoinRequest(PlayerName : String, view : Client_AddPlayerToList(PlayerName : String, view : NetworkPlayer) MasterServer.RegisterHost(RegisterHostName,MatchName,"") Network.InitializeServer(MaxPlayersCount, NetworkPort, true) // false = Not useing internet Some of the connection codes : function StartServer(ServerName:String ,ServerPassword:String ,MaxPlayers:int) What should I do to fix the time problem, and how can I show message about the server status, like if there any problem with the connection, show message with that problem, because I press joining game and wait about 30 seconds after that the game work or not. If you still have trouble you should rather directly contact the makers of the asset.I created a Multilayer game, and every t$$anonymous$$ng work fine except one t$$anonymous$$ng. There might still be some changes to do and I'm not saying this will completely fix that asset. See Packages for more information about the PackageManager and packages in general. In order to still be able to use the HLAPI for now you have to go to the PackageManager ( Window → Package Manager ) and find and import the Multiplayer HLAPI package. It will soon be (almost) completely deprecated. This has been ** known for quite a while** already. I would suspect maintanace kind of stopped quite a while ago and there will at minimum be some severe hickups in implementing it into most latest Unity versions over 3 years later. When using an asset from the Asset-Store that says Unity version 5.2.1 or higher. You should rather make incremental step-wise updates and also when you do be aware of what changes each version in between brings. you can expect a lot of API changes between over 3 years apart software versions in general. You shouldn't make huge jumps in Unity versions. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |