How SceneView and ArSceneView work
masterSceneView provides two primary view types for 3D and AR experiences:
SceneView: Used for 3D-only experiences using the Google Filament engine.ArSceneView: Used for ARCore + 3D experiences.
Unlike previous implementations (like ArFragment), all core functionality is accessible directly at the SceneView/ArSceneView level. You no longer need to traverse through sceneFragment.sceneview.scene or sceneFragment.session.config.
Key improvements include:
- Automatic Handling: Camera permissions and ARCore installation/updates are handled automatically by the view.
- Lifecycle Awareness: Components are lifecycle-aware for better memory management, and resource loading via
LifecycleScopestarts on view creation and is cancelled on destruction. - Simplified API: Properties like
positionX,rotationY, andscaleare directly accessible, replacing the need for manual local/worldVector3conversions.