Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
devwiki:arfoundation [2022/05/07 05:48] – [AR Foundation Setup - markerless] ying | devwiki:arfoundation [2022/05/24 12:10] (current) – [Other related info] ying | ||
---|---|---|---|
Line 60: | Line 60: | ||
* AR session: > add AR placement interactable (put to place prefab there, select mode: single/ | * AR session: > add AR placement interactable (put to place prefab there, select mode: single/ | ||
* [opt: use AR Placement interactable -- Single] | * [opt: use AR Placement interactable -- Single] | ||
+ | |||
+ | ====== AR Foundation Setup - markerless v2 ====== | ||
+ | |||
+ | - build setting: switch to target platform | ||
+ | * building setting > player setting: other > input setting: both | ||
+ | - Package Manager from Unity registry : install (AR foundation) + (ARCore XR) + (XR interactive toolkit) | ||
+ | * note: if xr interactive pop up, choose | ||
+ | - build setting > Player setting - other settings: | ||
+ | - OpenGL before vulkan | ||
+ | - min api : android api level 26 (store 30) | ||
+ | - scripting backend: ILL2CPP | ||
+ | - uncheck armv7 and check arm64 | ||
+ | - input: both (need to restart Unity) | ||
+ | - xr plug-in, check ARCore | ||
+ | - create XR > AR session + AR session origin | ||
+ | - ar session origin > add: ar plane manager | ||
+ | - outliner > create XR > AR Default Plane, put it prefab | ||
+ | - drag that plane prefab into AR Plane Manager (plane prefab) | ||
+ | - direction mode: horizontal | ||
+ | - drag that plane prefab into AR Plane Manager (plane prefab) | ||
+ | - ar session origin > add: ar raycast manager | ||
+ | - ar session origin > add: ar anchor manager | ||
+ | - ar session origin > add: AR environment prob manager | ||
+ | - (opt) HDRLightEstimation.cs into Directional Light, (put ar camera there); then, at AR camera manager, light estimation : everything | ||
+ | - AR camera: > add AR gesture interactor | ||
+ | - AR session: > add XR interaction mgr | ||
+ | - AR session: > add AR placement interactable [opt: use AR Placement interactable – Single] (put to place prefab there, select mode: single/ | ||
+ | - create GameObject Prefab | ||
+ | - root GameObject > - add: collider (if its children no collider) | ||
+ | - root GameObject > - add : AR selection interactable | ||
+ | - (opt) quad obj prefab with new material (unlit/ | ||
+ | - put that selector prefab inside the GameObject prefab, hide, and drag it to selector indicator. | ||
+ | - alternative: | ||
+ | - root GameObject > - add : Translation [opt: ARTranslationInteractableAnchor.cs] | ||
+ | - root GameObject > - add : Rotation/ | ||
+ | - create UI | ||
+ | - create canvas (1080x1920, scale with screen ) | ||
+ | - image with moving sprite | ||
+ | - ctrl+6: animation panel, select the image, and create, and drag image seq into animation | ||
+ | - make the image not blocking user click, uncheck Image > Raycast Target | ||
+ | - (opt) UIManager script --> Canvas object | ||
+ | * AR Camera -> UIManager (AR Camera manager) | ||
+ | * AR Session Origin -> UIManager (Placement manager) | ||
+ | * Plane vis prefab -> Plane Prefab | ||
+ | * Go To AR session > AR placement Interactable Single Anchor: | ||
+ | * interactable events: add new, drag Canvas to object, and use PlacedObject() function as response | ||
+ | - prefab animation | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
====== AR GPS ====== | ====== AR GPS ====== | ||
* import AR GSP package, right click add > AR GPS > Create basic scene structure | * import AR GSP package, right click add > AR GPS > Create basic scene structure | ||
+ | * GSP stage object, uncheck "Use moving average" | ||
====== UI Setup ====== | ====== UI Setup ====== | ||
Line 78: | Line 133: | ||
* https:// | * https:// | ||
+ | |||
+ | Tool: | ||
+ | * view phone screen on windows: | ||
+ | * https:// | ||