How working with Area Target Demo

In Area Target demo you will be able to place desired scene via creating scene on unity editor. Then you can view the scene through the app itself in the real world. Follow the steps given below to understand how the demo works.

First steps look similar to a basic demo where you can place dummy objects in the scene. You can place notes by touch on the description panel.

Then you should take data from your AR device to Unity Editor. Once you place the dummy boxes & save data into the Json file & it saves in your device.

If you are an IOS user, by following steps you can take the json file into Unity Editor.

  • Step 1 : Plug IOS into your pc & open Xcode. Once you open it you can see your device top middle corner.

  • Step 2 : Go Window -> Devices and Simulators.

  • Step 3: In the Devices window under Installed apps you can see an Easy AR Spatial Anchors with Azure Cloud app. Select the app & go to the bottom of the window, click the small gear icon left corner. Click that gear icon.

  • Step 4 : Click Download container. Save any where you want. Then right click on saved file & click Show package content.

  • Step 5: Go to AppData -> Documents -> AR Feature Point Data. You can See a Json file named ARFeaturePointsData.json. This is the json we want to get in Unity editor.

  • Step 6 : Drag & drop ARFeaturePointsData.json to Unity project in Assets -> Easy AR Spatial Anchors -> Resources -> ARFeaturePointsData folder.

If you are an Android user, You can easily find ARFeaturePointsData.json file in your mobile file manager.

In your file manager go to Android -> data -> com.Liveroom.EasyARSpatialAnchors -> files -> AR Feature Point Data folder. Get ARFeaturePointsData.json file from this folder & move json file into Assets -> Easy AR Spatial Anchors -> Resources -> ARFeaturePointsData folder.

Create scene in Unity Editor

Now you have already taken the ARFeaturePointsData json file to your Unity project. Now you can create your own scene. Follow the steps given below to create your own scene.

  • Step 1 : Load Scene Maker scene in Easy AR Spatial Anchors -> Scenes folder.

  • Step 2: Click the play button in the scene. Rest of the steps should follow the editor in play mode.

  • Step 3: In the hierarchy we can see New game objects, Under New Game Object there are 2 dummy boxes which we were placed in before when creating the scene in the Area Target demo.

  • Step 4 : Add game objects which are going to be replaced, in the Container game object in hierarchy. For example we take 2 rocket gameobjects & place them on the child of the Container.

Consider : Same gameobject prefabs should be placed in Area Target scene demo, under general configuration gameobject. Those prefabs should be placed under scenery Item prefabs in General Configuration Script.

For example we added Rocket gameobject to scenery prefab items under General Configuration script.

Don’t remove Environment scanner prefab from scenery Item prefabs. Environment scanner prefab is a default prefab of Area Target demo.

  • Step 5: Back to Scene Maker scene, You can replace the preferred game object for dummies. You can get a hint from the description on the dummy boxes. We have added 2 rocket objects before & we can replace them for dummy objects.

Consider : All this steps happen in play mode

  • Step 6: You have replaced game objects successfully. Now it's time to save scenery in the cloud. Go to the Game window & click the place button. This step will place rocket objects in necessary places & remove dummy objects.

  • Step 7 : Click Save Button to Save the scene to cloud.

Check whether console shows message “Saved Scenery data to cloud OK”

  • Step 8 : At last build the app again, because we added new prefabs for our Area target scene in 4th step.

Yay......You have completed your Area Target demo. Now you can see your custom scene which is created inside unity editor in the real world from the view scene in Area target demo in app.

Last updated