본문 바로가기

Unity

Unity ARCore Cloud Anchor

Unity ARCore Cloud Anchor

https://developers.google.com/ar/develop/unity/cloud-anchors/overview-unity

 

Share AR experiences with Cloud Anchors  |  ARCore  |  Google Developers

Use Cloud Anchors to create multiplayer or collaborative AR experiences that Android and iOS users can share. What is a Cloud Anchor? Using Cloud Anchors, your app lets users add virtual objects to an AR scene. Multiple users can then view and interact wit

developers.google.com

ARCore Cloud Anchor를 왜 사용하는가 : 

AR 씬에서 virtual objectMultiple User가 동시에 같은 물리적 공간에서 다른 위치에서 interact하기 위함

 

https://developers.google.com/ar/develop/unity/cloud-anchors/quickstart-unity-android

 

Quickstart for Cloud Anchors in Unity for Android  |  ARCore

Use Cloud Anchors to build AR experiences that Android and iOS users can share. Prerequisites If you are new to working with anchors, see Working with anchors for an introduction. The following steps assume that you have already installed and configured th

developers.google.com

Requirement : 

1. arcore sdks 1.13 or later

2. you must disclose the use of Cloud Anchors prominently

 

Unity build :

1.     ARCore Package 불러오기(1.13 or later)

2.     Package – Multiplayer HLAPI, XR Legacy Input Helpers

Multiplayer HLAPI, XR Legacy Input Helpers

3.     Switch platform to Android

Switch platform to Android

4.     Remove vulkan

Remove vulkan from Grphics APIs

5.     Multithreaded Rendering uncheck

6.     Package name

7.     Minimum api level – android 7.0 nougat

Multithreaded Rendering uncheck/Package name/minimum api level – android 7.0 nougat

8.     Arcore supported enable

in XR Settings - ARCore Supported enabled

9.     Api key 넣기(google cloud)*

10.  Setup project services and multiplayer*

https://cloud.google.com/docs/authentication/api-keys?ref_topic=6262490&visit_id=637287340522311276-3370617037&rd=1

 

API 키 사용  |  인증  |  Google Cloud

이 가이드에서는 Google Cloud 애플리케이션을 위해 API 키를 만들고 API 키 제한사항을 설정하는 방법을 보여줍니다. Google Cloud API 인증에 대한 자세한 내용은 인증 개요를 참조하세요. Google Maps Platfo

cloud.google.com

https://console.cloud.google.com/apis/library/arcorecloudanchor.googleapis.com

 

Google Cloud Platform

하나의 계정으로 모든 Google 서비스를 Google Cloud Platform을 사용하려면 로그인하세요.

accounts.google.com

https://docs.unity3d.com/Manual/SettingUpProjectServices.html

 

Unity - Manual: Setting up your project for Unity Services

Setting up your project for Unity Services To get started with Unity’s family of services, you must first link your project to a Unity Services Project ID. A Unity Services Project ID is an online identifier which is used across all Unity Services. These

docs.unity3d.com

https://docs.unity3d.com/Manual/UnityMultiplayerSettingUp.html

 

Unity - Manual: Setting up Unity Multiplayer

NetworkReader and NetworkWriter serializers Integrating the Multiplayer Service Setting up Unity Multiplayer To start using Unity Multiplayer, your project must be set up to use Unity Services. Once you have done this, you can enable the Multiplayer Servic

docs.unity3d.com

App Host :

A.     Wait a few secs after the session starts to stabilize

B.     When selecting a location to host the anchor, find distinguishable from each other

C.     Point the rear device camera at the center of interest

D.     Move the device around to map the environment from different viewing angles and positions for up to 30 secs

E.      Call hostCloudAnchor() to initiate the hosting request.

F.      arcore Uploads visual data, device poses, anchor pose

G.     cloud anchor creates a 3d feature map of space, return anchor id

H.     use Anchor.CloudAnchorState to check the status of a hosted anchor

 

App Resolve :

A.     wait a secs after the session starts to stabilize

B.     scan the original area of interest

C.     call resolveCouldAnchor() and use Anchor.CloudAnchorState toe check the status

D.     if you want to cancel  call detach()

E.      when it finds a match, the service return the pose of the cloud anchor

'Unity' 카테고리의 다른 글

Swift(StoryBoard) + Unity  (0) 2020.05.28