Astra Unity 2.6.6
Astra Unity Plugin
Astra.AstraManager Class Reference

AstraManager is a scene object which manages the Astra system. It must be initialized before other Astra SDK operations can be used. It is started using AstraManager.StartupAstra. Code can then wait for the initialization to be complete by waiting on AstraManager.WaitForInit. Alternatively you can poll on AstraManager.IsReady until it returns true. More...

Inheritance diagram for Astra.AstraManager:

Public Member Functions

delegate void Tick (MonoBehaviour ctx, float deltaTime)
 
delegate IEnumerator TickCo (MonoBehaviour ctx, float deltaTime)
 

Static Public Member Functions

static AstraManager StartupAstra ()
 Used to initialize the Astra system. Creates an AstraManager scene object named "AstraManagerGO" if it doesn't already exist. It will attach an AstraManager component to that object, and then return a reference to that component. It is up to the app using the Astra SDK to keep track of the AstraManager reference if any of it's functionality is needed. NOTE: This must be called on main thread as it touches GameObject code.
 
static bool IsReady ()
 Whether the Astra system has completed initializing. Generally this isn't something you need to worry about directly as requests via API calls will be placed into queues and run when ready for you. This is only useful if you need to fire a non-queued call or want to know when Astra has finished initialization. More...
 
static IEnumerable WaitForInit ()
 Coroutine to wait for the Astra system to be initialized. It will check once per frame until it's ready. More...
 
static bool IsConfigInitialized ()
 Tells you if the Astra Configuration has been loaded or not More...
 

Public Attributes

JobQueue jobQueue = null
 

Static Protected Member Functions

static bool IsBuildingPlayer ()
 

Protected Attributes

Delegate _OnBeforeAssemblyReloadHandler = null
 
System.Reflection.EventInfo _OnBeforeAssemblyReloadEventHandler = null
 
ProjectConfiguration _configuration = null
 

Static Protected Attributes

static Dictionary< string, Type > typeCache = new Dictionary<string, Type>()
 
static bool _awaitingInit = true
 
static volatile bool _isQuitting = false
 

Properties

static AstraManager Instance [get]
 NOTE: This can only be called on main thread and you should avoid it's direct use if you're able to More...
 
ProjectConfiguration Configuration [getset]
 The most recent configuration that is loaded for Astra More...
 

Events

Tick OnTick
 
Tick OnTickCo
 

Detailed Description

AstraManager is a scene object which manages the Astra system. It must be initialized before other Astra SDK operations can be used. It is started using AstraManager.StartupAstra. Code can then wait for the initialization to be complete by waiting on AstraManager.WaitForInit. Alternatively you can poll on AstraManager.IsReady until it returns true.

Member Function Documentation

◆ IsConfigInitialized()

static bool Astra.AstraManager.IsConfigInitialized ( )
inlinestatic

Tells you if the Astra Configuration has been loaded or not

Returns
True if a configuration is set up, false otherwise

◆ IsReady()

static bool Astra.AstraManager.IsReady ( )
inlinestatic

Whether the Astra system has completed initializing. Generally this isn't something you need to worry about directly as requests via API calls will be placed into queues and run when ready for you. This is only useful if you need to fire a non-queued call or want to know when Astra has finished initialization.

Returns
True when all systems are ready, false if systems are still starting or the system is shutting down
See also
WaitForInit

◆ WaitForInit()

static IEnumerable Astra.AstraManager.WaitForInit ( )
inlinestatic

Coroutine to wait for the Astra system to be initialized. It will check once per frame until it's ready.

Example usage (called within a coroutine):

AstraManager.StartupAstra();
yield return AstraManager.WaitForInit();
// your code here now that astra is ready
See also
IsReady

Property Documentation

◆ Configuration

ProjectConfiguration Astra.AstraManager.Configuration
getset

The most recent configuration that is loaded for Astra

◆ Instance

AstraManager Astra.AstraManager.Instance
staticget

NOTE: This can only be called on main thread and you should avoid it's direct use if you're able to


The documentation for this class was generated from the following file: