Google is committed to advancing racial equity for Black communities. See how.

GoogleARCore.ARCoreSessionConfig

Holds settings that are used to configure the session.

Summary

Inheritance

Inherits from: ScriptableObject

Public attributes

AugmentedFaceMode = AugmentedFaceMode.Disabled
Chooses which GoogleARCore.AugmentedFaceMode the ARCore session uses.
AugmentedImageDatabase
The database to use for detecting AugmentedImage Trackables.
CameraFocusMode = CameraFocusMode.FixedFocus
On supported devices, selects the desired camera focus mode.
CloudAnchorMode = CloudAnchorMode.Disabled
Chooses which Cloud Anchors mode will be used in ARCore session.
DepthMode = DepthMode.Disabled
Chooses which DepthMode will be used in the ARCore session.
InstantPlacementMode = InstantPlacementMode.Disabled
Chooses the desired Instant Placement mode.
LightEstimationMode = LightEstimationMode.EnvironmentalHDRWithReflections
Choose which light estimation mode will be used.
MatchCameraFramerate = true
bool
Toggles whether ARCore may introduce a delay into Unity's frame update to match the rate that the camera sensor is delivering frames (this is 30 frames-per-second on most devices).
PlaneFindingMode = DetectedPlaneFindingMode.HorizontalAndVertical
Chooses which plane finding mode will be used.

Properties

EnableCloudAnchor
bool
Deprecated. Please use ARCoreSessionConfig.CloudAnchorMode instead.
Gets or sets a value indicating whether Cloud Anchors are enabled.
EnableLightEstimation
bool
Deprecated. Please use ARCoreSessionConfig.LightEstimationMode instead.
Gets or sets a value indicating whether light estimation is enabled.
EnablePlaneFinding
bool
Gets or sets a value indicating whether PlaneFinding is enabled.

Public functions

CopyFrom(ARCoreSessionConfig other)
void
ValueType copy from another SessionConfig object into this one.
Equals(object other)
override bool
ValueType check if two SessionConfig objects are equal.
GetHashCode()
override int
Return a hash code for this object.
OnValidate()
void
Unity OnValidate.

Public attributes

AugmentedFaceMode

AugmentedFaceMode AugmentedFaceMode = AugmentedFaceMode.Disabled

Chooses which GoogleARCore.AugmentedFaceMode the ARCore session uses.

AugmentedImageDatabase

AugmentedImageDatabase AugmentedImageDatabase

The database to use for detecting AugmentedImage Trackables.

When this value is null, Augmented Image detection is disabled.

CameraFocusMode

CameraFocusMode CameraFocusMode = CameraFocusMode.FixedFocus

On supported devices, selects the desired camera focus mode.

On these devices, the default desired focus mode is currently GoogleARCore.CameraFocusMode.FixedFocus, although this default might change in the future. See the ARCore supported devices page for a list of devices on which ARCore does not support changing the desired focus mode.

For optimal AR tracking performance, use the focus mode provided by the default session config. While capturing pictures or video, use GoogleARCore.CameraFocusMode.AutoFocus. For optimal AR tracking, revert to the default focus mode once auto focus behavior is no longer needed. If your app requires fixed focus camera, set GoogleARCore.CameraFocusMode.FixedFocus before enabling the AR session. This ensures that your app always uses fixed focus, even if the default camera config focus mode changes in a future release.

CloudAnchorMode

CloudAnchorMode CloudAnchorMode = CloudAnchorMode.Disabled

Chooses which Cloud Anchors mode will be used in ARCore session.

DepthMode

DepthMode DepthMode = DepthMode.Disabled

Chooses which DepthMode will be used in the ARCore session.

InstantPlacementMode

InstantPlacementMode InstantPlacementMode = InstantPlacementMode.Disabled

Chooses the desired Instant Placement mode.

LightEstimationMode

LightEstimationMode LightEstimationMode =
            LightEstimationMode.EnvironmentalHDRWithReflections

Choose which light estimation mode will be used.

MatchCameraFramerate

bool MatchCameraFramerate = true

Toggles whether ARCore may introduce a delay into Unity's frame update to match the rate that the camera sensor is delivering frames (this is 30 frames-per-second on most devices).

Enabling this setting can reduce power consumption caused by rendering the same background texture more than once. Since enabling this setting also sets QualitySetting.vSyncCount to 0 the entire Unity application (e.g animations, UI) will also update at the camera sensor frame rate.

Note that enabling this setting does not guarantee each Unity frame will have a new and unique camera background texture. This is because the period of time ARCore will wait for a new camera frame to become available is capped (currently at 66ms) to avoid a deadlock.

PlaneFindingMode

DetectedPlaneFindingMode PlaneFindingMode =
            DetectedPlaneFindingMode.HorizontalAndVertical

Chooses which plane finding mode will be used.

Properties

EnableCloudAnchor

bool EnableCloudAnchor

Gets or sets a value indicating whether Cloud Anchors are enabled.

true if enable Cloud Anchors; otherwise, false.

Deprecated. Please use ARCoreSessionConfig.CloudAnchorMode instead.

EnableLightEstimation

bool EnableLightEstimation

Gets or sets a value indicating whether light estimation is enabled.

true if enable light estimation; otherwise, false.

Deprecated. Please use ARCoreSessionConfig.LightEstimationMode instead.

EnablePlaneFinding

bool EnablePlaneFinding

Gets or sets a value indicating whether PlaneFinding is enabled.

Public functions

CopyFrom

void CopyFrom(
  ARCoreSessionConfig other
)

ValueType copy from another SessionConfig object into this one.

Details
Parameters
other
The SessionConfig to copy from.

Equals

override bool Equals(
  object other
)

ValueType check if two SessionConfig objects are equal.

Details
Parameters
other
The other SessionConfig.
Returns
True if the two SessionConfig objects are value-type equal, otherwise false.

GetHashCode

override int GetHashCode()

Return a hash code for this object.

Details
Returns
A hash code value.

OnValidate

void OnValidate()

Unity OnValidate.