AR Foundation makes it possible to use Unity to create ARCore and ARKit apps.
- Change platform from
build settingsto android.
- Go to
- Uncheck multithread rendering + remove Vulkan from Graphics APIs + Minimum API level to 26
- Install Packages:
ARKit XR Plugin, and
ARCore XR Plugin
- AR Session Origin game object
- Remove the main camera
- AR Session game object
- Create some object to the scene that is rendered in AR
Build Settingsand choose your phone connected with USB from
- Build and Run
Change to iOS
Requires ARKit support+ Architecture from Universal to ARM64 + Target minimum iOS version to 11.0.
Don't do this on iOS
Build and create a folder where the app will be built for Xcode
Open the new files on Xcode by opening
Play to run the program
Learn how to place game object to a marker.
Detecting a plane.
Adding game object to the detected plane.
AR Session Origin contains a camera that can be tagged as
MainCamera and then the default camera can be deleted.
AR Session need to be created too.
This is the point where you probably want to start doing something because all the videos below talk about these same things Dinesh explained well above.
- It's okay to use empty game object for just code placeholder
- There is auto signin option in Unity that should remove the need to do it in Xcode
- Run and build should work automatically after the first setup with iOS
- Unity physics work better with bigger objects and smaller objects might have some weird behaviour.
Most of the projects contains three things to start with:
- Place objects to the ground
- Click events
- Toggle on and off AR planes and point clouds
The packages and Unity is constantly changing and different versions might affect how the things work.
In the video he creates a simple app where is UI button and then it uses point clouds (the things listed above). This is great video to watch to see how UI elements work with AR content.
This video didn't explain anything new but talked about the same things as previous videos.