Skip to content

Commit

Permalink
Fix AutoFocus without any double session resume needed!!!!!!!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasGorisse committed Apr 11, 2022
1 parent b8435dc commit a4ae3da
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ open class ArSceneView @JvmOverloads constructor(
super.onArSessionCreated(session)

session.configure { config ->
config.focusMode = focusMode
// FocusMode must be changed after the session resume to work
// config.focusMode = focusMode
config.planeFindingMode = planeFindingMode
config.depthEnabled = depthEnabled
config.instantPlacementEnabled = instantPlacementEnabled
Expand All @@ -283,6 +284,11 @@ open class ArSceneView @JvmOverloads constructor(
override fun onArSessionResumed(session: ArSession) {
super.onArSessionResumed(session)

session.configure { config ->
// FocusMode must be changed after the session resume to work
config.focusMode = focusMode
}

onArSessionResumed?.invoke(session)
}

Expand Down

0 comments on commit a4ae3da

Please sign in to comment.