class ARNetworkingManager (Niantic.ARDK.Extensions.ARNetworkingManager)

Overview

A Unity component that manages an ARNetworking’s lifetime. The session can either be started automatically through Unity lifecycle events, or can be controlled programatically. Any outstanding sessions are always cleaned up on destruction. Integrates with the ARSessionManager and NetworkSessionManager to make sure all components are set up correctly. More…

class ARNetworkingManager: Niantic.ARDK.Extensions.ARConfigChanger {
public:
    // properties

    IARNetworking ARNetworking;
    ARSessionManager ARSessionManager;
    NetworkSessionManager NetworkSessionManager;

    // methods

    virtual override void ApplyARConfigurationChange(ARSessionChangesCollector.ARSessionRunProperties properties);
};

Inherited Members

public:
    // properties

    bool AreFeaturesEnabled;
    bool CanInitialize;
    bool Initialized;

    // methods

    void Deinitialize();
    void DisableFeatures();
    void EnableFeatures();
    void Initialize();
    virtual abstract void ApplyARConfigurationChange(ARSessionChangesCollector.ARSessionRunProperties properties) = 0;

Detailed Documentation

A Unity component that manages an ARNetworking’s lifetime. The session can either be started automatically through Unity lifecycle events, or can be controlled programatically. Any outstanding sessions are always cleaned up on destruction. Integrates with the ARSessionManager and NetworkSessionManager to make sure all components are set up correctly.

If ManageUsingUnityLifecycle is true: OnAwake(): An ARNetworking (and the component ARSession and MultipeerNetworking objects) will be initialized OnEnable(): The ARSession will be run and the MultipeerNetworking will join a session OnDisable(): The ARSession will be paused and the MultipeerNetworking will leave the session OnDestroy(): The ARNetworking (and the component ARSession and MultipeerNetworking objects) will be disposed Else: Call Initialize to: Initialize an ARNetworking (and the component ARSession and MultipeerNetworking objects) Call EnableFeatures to: Run the ARSession and join the MultipeerNetworking Call DisableFeatures to: Pause the ARSession and leave the MultipeerNetworking session Call Destroy to: Dispose the ARNetworking (and the component ARSession and MultipeerNetworking objects)

Note

Because the CapabilityChecker’s method for checking device support is async, the above events (i.e. initialization of ARNetworking) may not happen on the exact frame as the method (OnAwake or Initialize) is invoked.

Methods

virtual override void ApplyARConfigurationChange(ARSessionChangesCollector.ARSessionRunProperties properties)

Inheritors should override this to modify session configuration settings based on their script’s needs.

Note

This is executed as a result of the ARSession being run, which may or may not be triggered by a call to RaiseConfigurationChanged().