美文网首页
Unity3d_Multiplayer Netwoking4

Unity3d_Multiplayer Netwoking4

作者: 慕城祉宇流年殇 | 来源:发表于2018-01-10 10:00 被阅读0次

    Registering the Player prefab

    注册玩家预制

    Once the Player prefab has been created, it must be registered with the Networking system.

    一旦玩家预制完成,就必须在网络系统中注册。

    The Network Manager will use this prefab to spawn new Player GameObjects into the scene, but the Player prefab needs to be registered with the Network Manager as the prefab to spawn for the player.

    网络管理员将使用这个预置来在场景中生成新的玩家游戏对象,但是玩家预制程序需要在网络管理器中注册为预置,以供玩家使用。

    Select the Network Manager GameObject in the Hierarchy Window.

    在层次结构窗口中选择Network Manager GameObject。

    With the Network Manager selected,

    选择了网络管理器,

    ...

    open the Spawn Info foldout in the Inspector for the NetworkManager.

    在网络管理器的检查器中打开派生信息foldout。

    Drag the Player prefab into the Player Prefab field.

    把玩家预置到玩家的预置场中。

    把玩家预置到玩家的预置场中

    The NetworkManager component is used to manage the spawning of networked objects, including the player.

    NetworkManager组件用于管理网络对象的生成,包括播放器。

    As most games have a single, identical prefab to represent any player in the game, the NetworkManager has a slot specifically for a player prefab.

    由于大多数游戏都有一个单一的、相同的预置来代表游戏中的任何玩家,NetworkManager有一个专门为玩家预置的插槽。

    A new GameObject representing the player will be created when each player's Client that joins the Host.

    当每个玩家的客户端加入主机时,将会创建一个新的游戏对象来表示玩家。

    For more information, please see the page on the NetworkManager.

    有关更多信息,请参见NetworkManager上的页面

    相关文章

      网友评论

          本文标题:Unity3d_Multiplayer Netwoking4

          本文链接:https://www.haomeiwen.com/subject/hywnnxtx.html