GoogleARCore.ARCoreSession

A component that manages the ARCore Session in a Unity scene.

Summary

Inheritance

Inherits from: MonoBehaviour

Public attributes

SessionConfig
A scriptable object specifying the ARCore session configuration.

Public functions

Awake()
void
Unity Awake.
OnChooseCameraConfigurationDelegate(List< CameraConfig > supportedConfigurations)
delegate int
Selects a camera configuration for the ARCore session being resumed.
OnDestroy()
void
Unity OnDestroy.
OnDisable()
void
Unity OnDisable.
OnEnable()
void
Unity OnEnable.
RegisterChooseCameraConfigurationCallback(OnChooseCameraConfigurationDelegate onChooseCameraConfiguration)
void
Registers a callback that allows a camera configuration to be selected from a list of valid configurations.

Public attributes

SessionConfig

ARCoreSessionConfig SessionConfig

A scriptable object specifying the ARCore session configuration.

Public functions

Awake

void Awake()

Unity Awake.

OnChooseCameraConfigurationDelegate

delegate int OnChooseCameraConfigurationDelegate(
  List< CameraConfig > supportedConfigurations
)

Selects a camera configuration for the ARCore session being resumed.

Details
Parameters
supportedConfigurations
A list of supported camera configurations. Currently it contains 3 camera configs. The GPU texture resolutions are the same in all three 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.
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 OnDestroy.

OnDisable

void OnDisable()

Unity OnDisable.

OnEnable

void OnEnable()

Unity OnEnable.

RegisterChooseCameraConfigurationCallback

void RegisterChooseCameraConfigurationCallback(
  OnChooseCameraConfigurationDelegate onChooseCameraConfiguration
)

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

The callback will be invoked each time the ARCore session is resumed which can happen when the ARCoreSession component becomes enabled or the Android application moves from 'paused' to 'resumed' state.

Details
Parameters
onChooseCameraConfiguration
The callback to register for selecting a camera configuration.

Send feedback about...