UArPlacementMode enum
HOST PROJECT SETUP
The package declares no camera or location permission and bundles no AR SDK, because its manifests are merged into every app that depends on it. The 3D viewer (U3DViewer, UArConfig.viewer) needs none of this; every camera-based experience needs the entries for the platforms you ship.
ANDROID -- android/app/build.gradle(.kts), inside dependencies:
implementation("com.google.ar:core:1.45.0")
ARCore is the only native library AR needs; the renderer is part of this
package. Without it every AR mode reports UArAvailabilityStatus.sdkMissing
and only the viewer works. Then android/app/src/main/AndroidManifest.xml,
inside <manifest>:
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera.ar" android:required="false" />
<!-- location content (UArGeoView, addGeoAnchor): -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<!-- recording with sound: -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
Geospatial (street-level visual positioning) and Cloud Anchors call
Google Cloud: enable the "ARCore API" in a Google Cloud project and add,
inside <application>:
<meta-data android:name="com.google.android.ar.API_KEY" android:value="YOUR_KEY" />
Without the key those two features fail with notAuthorized; everything else, including GPS + compass location content, keeps working.
IOS -- ios/Runner/Info.plist, inside the top-level <dict>:
<key>NSCameraUsageDescription</key>
<string>Used to place products and information in your space.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Used to show places around you.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Used to record video with sound.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Used to save photos and videos.</string>
AR needs iOS 15; room scanning iOS 16 and object capture iOS 17, both on LiDAR devices. USDZ / Reality models load natively, GLB / glTF through the built-in converter (static and node-animated; use USDZ for skinned rigs).
WEB:
Serve over https. Chrome on Android runs full WebXR AR after UArController.enterXr is called from a tap; other mobile browsers, including iOS Safari, get the camera + compass mode for location content and AR Quick Look / Scene Viewer through UAr.openNativeViewer. Models on another origin must send CORS headers.
MODELS: GLB is the portable format (Android, web, iOS). For AR Quick Look
on iOS, pass a USDZ as iosSource. Draco / meshopt compressed GLB files are
not supported; export them uncompressed.
Values
- tap → const UArPlacementMode
- reticle → const UArPlacementMode
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
UArPlacementMode> - A constant List of the values in this enum, in order of their declaration.