Class PeerInfoMessage | Multiplayer HLAPI | 1.0.8
docs.unity3d.com
    Show / Hide Table of Contents

    Class PeerInfoMessage

    Information about another participant in the same network game.

    This information is cached by clients and used during host-migration.

    Inheritance
    Object
    MessageBase
    PeerInfoMessage
    Namespace: UnityEngine.Networking.NetworkSystem
    Syntax
    [Obsolete("The high level API classes are deprecated and will be removed in the future.")]
    public class PeerInfoMessage : MessageBase

    Fields

    address

    The IP address of the peer.

    Declaration
    public string address
    Field Value
    Type Description
    String

    connectionId

    The id of the NetworkConnection associated with the peer.

    Declaration
    public int connectionId
    Field Value
    Type Description
    Int32

    isHost

    True if this peer is the host of the network game.

    Declaration
    public bool isHost
    Field Value
    Type Description
    Boolean

    isYou

    True if the peer if the same as the current client.

    Declaration
    public bool isYou
    Field Value
    Type Description
    Boolean

    playerIds

    The players for this peer.

    Declaration
    public PeerInfoPlayer[] playerIds
    Field Value
    Type Description
    PeerInfoPlayer[]

    port

    The network port being used by the peer.

    Declaration
    public int port
    Field Value
    Type Description
    Int32

    Methods

    Deserialize(NetworkReader)

    Declaration
    public override void Deserialize(NetworkReader reader)
    Parameters
    Type Name Description
    NetworkReader reader
    Overrides
    MessageBase.Deserialize(NetworkReader)

    Serialize(NetworkWriter)

    Declaration
    public override void Serialize(NetworkWriter writer)
    Parameters
    Type Name Description
    NetworkWriter writer
    Overrides
    MessageBase.Serialize(NetworkWriter)

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023