ARCoreExtensions

ARCore Extensions, this script allows an app to specify and provide access to AR Foundation object instances that should be used by ARCore Extensions.

Summary

Inheritance

Inherits from: UnityEngine::MonoBehaviour

Public attributes

ARCoreExtensionsConfig
Supplementary configuration to define features and options for the ARCore Extensions.
CameraConfigFilter
The ARCoreExtensionsCameraConfigFilter to define the set of properties desired or required by the app to run.
CameraManager
AR Foundation ARCameraManager used in the ARSessionOrigin.
OnChooseXRCameraConfiguration
The callback event that allows a camera configuration to be selected from a list of valid configurations.
Session
AR Foundation ARSession used by the scene.
SessionOrigin
AR Foundation ARSessionOrigin used by the scene.

Public functions

Awake()
void
Unity's Awake method.
OnChooseXRCameraConfigurationEvent(List< XRCameraConfiguration > supportedConfigurations)
delegate int
Selects a camera configuration for the ARCore session to use.
OnDestroy()
void
Unity's OnDestroy method.
OnDisable()
void
Unity's OnDisable method.
OnEnable()
void
Unity's OnEnable method.
Start()
void
Unity's Start method.
Update()
void
Unity's Update method.

Public attributes

ARCoreExtensionsConfig

ARCoreExtensionsConfig ARCoreExtensionsConfig

Supplementary configuration to define features and options for the ARCore Extensions.

CameraConfigFilter

ARCoreExtensionsCameraConfigFilter CameraConfigFilter

The ARCoreExtensionsCameraConfigFilter to define the set of properties desired or required by the app to run.

CameraManager

ARCameraManager CameraManager

AR Foundation ARCameraManager used in the ARSessionOrigin.

OnChooseXRCameraConfiguration

OnChooseXRCameraConfigurationEvent OnChooseXRCameraConfiguration

The callback event that allows a camera configuration to be selected from a list of valid configurations.

The callback should be registered before the ARCore session is enabled (e.g. Unity's Awake() method) to ensure it is triggered on the first frame update.

Session

ARSession Session

AR Foundation ARSession used by the scene.

SessionOrigin

ARSessionOrigin SessionOrigin

AR Foundation ARSessionOrigin used by the scene.

Public functions

Awake

void Awake()

Unity's Awake method.

OnChooseXRCameraConfigurationEvent

delegate int OnChooseXRCameraConfigurationEvent(
  List< XRCameraConfiguration > supportedConfigurations
)

Selects a camera configuration for the ARCore session to use.

Details
Parameters
supportedConfigurations
A list of supported camera configurations. The size is dependent on CameraConfigFilter settings. The GPU texture resolutions are the same in all configs. Currently, most devices provide GPU texture resolution of 1920 x 1080, but devices might provide higher or lower resolution textures, depending on device capabilities. The CPU image resolutions returned are VGA, 720p, and a resolution matching the GPU texture, typically the native resolution of the device.
Returns
The index of the camera configuration in supportedConfigurations to be used for the ARCore session. If the return value is not a valid index (e.g. the value -1), then no camera configuration will be set and the ARCore session will use the previously selected camera configuration or a default configuration if no previous selection exists.

OnDestroy

void OnDestroy()

Unity's OnDestroy method.

OnDisable

void OnDisable()

Unity's OnDisable method.

OnEnable

void OnEnable()

Unity's OnEnable method.

Start

void Start()

Unity's Start method.

Update

void Update()

Unity's Update method.