AR + GPS Location  3.0.0
All Classes Namespaces Functions Variables Properties Events Pages
ARLocation.ARLocationManager Class Reference

This Component manages all positioned GameObjects, synchronizing their world position in the scene with their geographical coordinates. This is done by calculating their position relative to the device's position. More...

Inheritance diagram for ARLocation.ARLocationManager:
ARLocation.Utils.Singleton< ARLocationManager >

Public Member Functions

override void Awake ()
 
void ResetARSession (Action cb=null)
 This will reset the AR Session and the AR+GPS system, repositioning all objects. More...
 
void Restart ()
 This will restart the AR+GPS system, repositioning all the objects. More...
 
string GetARSessionInfoString ()
 Returns a string describing the current AR session tracking status More...
 
string GetARSessionProviderString ()
 Returns a string describing the current AR Session provider, e.g., AR Foundation or Vuforia. More...
 
void OnARTrackingStarted (Action o)
 Add a event listener for when the AR Tracking starts. More...
 
void OnARTrackingRestored (Action callback)
 Add a event listener for when the AR Tracking regained after it was lost. More...
 
void OnARTrackingLost (Action callback)
 Add a event listener for when the AR Tracking is lost. More...
 

Public Attributes

Camera Camera
 
bool WaitForARTrackingToStart = true
 
bool RestartWhenARTrackingIsRestored
 
bool SetTargetFrameRateTo60Mhz = true
 
bool DebugMode
 
UnityEvent OnTrackingStarted = new UnityEvent()
 
UnityEvent OnTrackingLost = new UnityEvent()
 
UnityEvent OnTrackingRestored = new UnityEvent()
 
float CurrentGroundY => groundHeight ? groundHeight.CurrentGroundY : -ARLocation.Config.InitialGroundHeightGuess
 Returns the Y world-coordinate of the detected plane which is nearest to the user/camera. More...
 

Properties

IARSessionManager SessionManager [get]
 The instance of the 'IARSessionManager'. Handles the interface with the underlying AR session (i.e., Vuforia or AR Foundation). More...
 
Camera MainCamera [get]
 The 'MainCamera' that is being used for rendering the AR content. More...
 
- Properties inherited from ARLocation.Utils.Singleton< ARLocationManager >
static T Instance [get]
 Access singleton instance through this propriety. More...
 

Detailed Description

This Component manages all positioned GameObjects, synchronizing their world position in the scene with their geographical coordinates. This is done by calculating their position relative to the device's position.

Should be placed in a GameObject called "ARLocationRoot", whose parent is the "AR Session Origin".

Definition at line 29 of file ARLocationManager.cs.

Member Function Documentation

◆ GetARSessionInfoString()

string ARLocation.ARLocationManager.GetARSessionInfoString ( )

Returns a string describing the current AR session tracking status

Returns

Definition at line 195 of file ARLocationManager.cs.

◆ GetARSessionProviderString()

string ARLocation.ARLocationManager.GetARSessionProviderString ( )

Returns a string describing the current AR Session provider, e.g., AR Foundation or Vuforia.

Returns

Definition at line 204 of file ARLocationManager.cs.

◆ OnARTrackingLost()

void ARLocation.ARLocationManager.OnARTrackingLost ( Action  callback)

Add a event listener for when the AR Tracking is lost.

Parameters
callback

Definition at line 238 of file ARLocationManager.cs.

◆ OnARTrackingRestored()

void ARLocation.ARLocationManager.OnARTrackingRestored ( Action  callback)

Add a event listener for when the AR Tracking regained after it was lost.

Parameters
callback

Definition at line 229 of file ARLocationManager.cs.

◆ OnARTrackingStarted()

void ARLocation.ARLocationManager.OnARTrackingStarted ( Action  o)

Add a event listener for when the AR Tracking starts.

Parameters
o

Definition at line 213 of file ARLocationManager.cs.

◆ ResetARSession()

void ARLocation.ARLocationManager.ResetARSession ( Action  cb = null)

This will reset the AR Session and the AR+GPS system, repositioning all objects.

Parameters
cbOptional callback, called when the system has restarted.

Definition at line 166 of file ARLocationManager.cs.

◆ Restart()

void ARLocation.ARLocationManager.Restart ( )

This will restart the AR+GPS system, repositioning all the objects.

Definition at line 181 of file ARLocationManager.cs.

Member Data Documentation

◆ CurrentGroundY

float ARLocation.ARLocationManager.CurrentGroundY => groundHeight ? groundHeight.CurrentGroundY : -ARLocation.Config.InitialGroundHeightGuess

Returns the Y world-coordinate of the detected plane which is nearest to the user/camera.

Definition at line 66 of file ARLocationManager.cs.

Property Documentation

◆ MainCamera

Camera ARLocation.ARLocationManager.MainCamera
get

The 'MainCamera' that is being used for rendering the AR content.

Definition at line 61 of file ARLocationManager.cs.

◆ SessionManager

IARSessionManager ARLocation.ARLocationManager.SessionManager
get

The instance of the 'IARSessionManager'. Handles the interface with the underlying AR session (i.e., Vuforia or AR Foundation).

Definition at line 56 of file ARLocationManager.cs.


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