class UnityLifecycleDriver (Niantic.ARDK.Extensions.UnityLifecycleDriver)

Overview

Base class for ARDK’s extension MonoBehaviour extension classes. All Unity lifecycle methods are sealed to prevent child classes from implementing functionality in them; functionality is instead kept inside virtual methods so the class can be controlled both by the Unity lifecycle and independently (via pure scripting). More…

class UnityLifecycleDriver: Niantic.ARDK.Extensions.UnityLifecycleDriverBase {
public:
    // properties

    bool AreFeaturesEnabled;
    bool CanInitialize;
    bool Initialized;

    // methods

    void Deinitialize();
    void DisableFeatures();
    void EnableFeatures();
    void Initialize();
};

// direct descendants

class ARConfigChanger;
class CapabilityChecker;
class DepthMeshOcclusionManager;
class FeaturePreloadManager;
class GameboardManager;
class NetworkSessionManager;
class ARRenderingManager;

Detailed Documentation

Base class for ARDK’s extension MonoBehaviour extension classes. All Unity lifecycle methods are sealed to prevent child classes from implementing functionality in them; functionality is instead kept inside virtual methods so the class can be controlled both by the Unity lifecycle and independently (via pure scripting).

Properties

bool AreFeaturesEnabled

Value is true if this component is enabled. A subclass may gate certain behaviours based on this value.

bool CanInitialize

Value is true if this component can be validly initialized.

bool Initialized

Value is true if this component has been initialized.

Methods

void Deinitialize()

Releases any resources held by the instance as defined by a subclass in DeinitializeImpl. Once this is called, Initialize can’t be called. Instead a new instance must be made.

void DisableFeatures()

Disable any features controlled by the instance as defined by a subclass in DisableFeaturesImpl.

void EnableFeatures()

Enabled any features controlled by this instance as defined by a subclass in EnableFeaturesImpl. This will initialize the instance if it wasn’t already.

void Initialize()

Prepares the instance for use. This is where it will gather all the resources it needs as defined by a subclass in InitializeImpl.