class AuthBehaviour (Niantic.ARDK.Networking.HLAPI.Object.Unity.AuthBehaviour)

Overview

A NetworkedBehaviour that can be attached to a NetworkedUnityObject to automatically open channels and handle Authority over the network. More...

class AuthBehaviour:
    Niantic.ARDK.Networking.HLAPI.Object.Unity.NetworkedBehaviour,
    Niantic.ARDK.Networking.HLAPI.Authority.IAuthorityReplicator {
public:
    // properties

    INetworkGroup Group;
    string Identifier;
    Role LocalRole;

    // methods

    IReadOnlyCollection<IPeer> PeersOfRole(Role role);
    Role RoleOfPeer(IPeer peer);
    void TryClaimRole(Role role, Action onPass, Action onFail);
    void Unregister();
};

Inherited Members

public:
    // properties

    NetworkedUnityObject? Owner;
    INetworkGroup Group;
    string Identifier;
    Role LocalRole;

    // methods

    int Initialize(out Action initializer);
    void Unregister();
    IReadOnlyCollection<IPeer> PeersOfRole(Role role);
    Role RoleOfPeer(IPeer peer);
    void TryClaimRole(Role role, Action onPass, Action onFail);

Detailed Documentation

A NetworkedBehaviour that can be attached to a NetworkedUnityObject to automatically open channels and handle Authority over the network.

Methods

IReadOnlyCollection<IPeer> PeersOfRole(Role role)

Gets all peers that are of a given role. This method should never return null, if needed an empty collection is returned.

Role RoleOfPeer(IPeer peer)

Gets the role of a peer.

void TryClaimRole(Role role, Action onPass, Action onFail)

Trys to claim a role for the local peer.

void Unregister()

Unregister this handler from its current group.