Skip to content

A simple AR Pet using Apple AR Kit plugin on Unity

Notifications You must be signed in to change notification settings

asilvaferna/ARKat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 

Repository files navigation

ARKat

A simple AR Pet using Apple AR Kit plugin on Unity

Getting started

If you want to use the AR Kit plugin on your project you must follow this step-by-step guide

Prerequisites

  • iOS Device with a A8 chip or best
  • Macinstosh device with Xcode 9 installed
  • Unity

Installation

  1. Open Unity on your device and download the AR Kit Plugin
  2. Once donwloaded, import the files off the plugin
  3. You are ready to go!

Getting deeper

I have the plugin installed but, now what?

The assets

When you have all the files imported, you must think, how do I do something with this? Well, we are on our way

First of all navigate through the folders and find the one called /Examples/UnityARKitScene double click on the asset UnityARKitScene. You must see something like this:

GameObject

Understanding the game objects

The image on top ilustrates the current scene. Currently this game will just place one cube wherever you touch the screen. But wouldn't it be cooler that you could change that "ugly" cube and place instead one 3D object? In this example you will use the Cartoon Cat asset that can be found on the Asset Store.

  • Replace the HitCube gameobject for one of the 3D models in the Cartoon Cat asset
  • Delete RandomCube gameobject
  • In the assets folder search for shadowPlanePrefab and add it to the Scene
  • On CameraParent reset the axis to x:0, y:0, z:0. Do the same with HitCubeParent gameobject, and shadowPlanePrefab

After doing the instructions on top, the scene must be something like this:

LastScene

Then you just have to build the game with:  ⇧ + ⌘ + B

Keep reading to learn how to build the project in Xcode

Xcode project building

Open Xcode and search the path of the builded unity game. In my case is /Unity/AR Test/Builds

Once opened, you have to modify the Unity-iPhone build file. Change the name of the app on Display Name, and the bundle identifier. You have to sign the app with your Developer account. Change the Deployment Target to iOS 11.0. Device orientation has to be like this:

  • Portrait
  • Upside Down
  • Landscape Left
  • Landscape Right

And you have finish! Make sure your iOS Device is plugged in, and click play button to build the project.

Demo

Gif

Acknowledgments

About

A simple AR Pet using Apple AR Kit plugin on Unity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published