template interface INetworkedField (Niantic.ARDK.Networking.HLAPI.Object.INetworkedField)

Overview

A field that will be replicated over the network. More...

template <TValue>
interface INetworkedField: Niantic.ARDK.Networking.HLAPI.INetworkedDataHandler {
    // properties

    Optional<TValue> Value;

    // events

    event ValueChanged();
    event ValueChangedIfReceiver();
    event ValueChangedIfSender();

    // methods

    void SetIfSender(TValue newValue);
};

// direct descendants

template <TValue>
class NetworkedField;

Inherited Members

public:
    // properties

    INetworkGroup Group;
    string Identifier;

    // methods

    void Unregister();

Detailed Documentation

A field that will be replicated over the network.

Parameters:

TValue

Properties

Optional<TValue> Value

The value of the field.

Events

event ValueChanged()

Fired on all peers when the value changes.

event ValueChangedIfReceiver()

Fired on the receiver when the value changes.

event ValueChangedIfSender()

Fired on the sender when the value changes.

Methods

void SetIfSender(TValue newValue)

Sets the value only if the local peer is the sender for this field.

Parameters:

newValue

The new value for the field.