This repo is a collection of features and utilities for building cross-platform mixed reality applications. I've designed these features to be flexible and easily extendable, encouraging you to customize the scripts to suit your project!
Features are currently tested on
plans to support Android XR based devices in the future.
⚠️ WARNING: The support for Apple Vision Pro uses Unity PolySpatial.
This requires a Unity Pro, Enterprise or Industry license. This is NOT required for Quest support.
Advanced setup with unique content appearing on different surfaces. It also uses the the callback event to show the content in a unique way, revealing itself in rings originating from the point of contact.
Basic setup that has the same content appear on all surfaces. It creates the content instantly and has debug visuals for the content and AR planes.
The user needs to have gone through Space setup to layout and map their real environment. See: The Documentation.
The user will have to grant the app permission to use the Space setup.
This project uses Unity PolySpatial and requires a Pro, Enterpise or Industry license. If you don't have one of those license the project will prompt you to remove the PolySpatial packages. If you are building for meta quest it is okay to do so.
This feature uses the poisson disc sampling technique to distrubute objects on a physical surface using AR Planes through AR Foundation. It's designed to offer flexibility for random content distribution, unique content per plane alignment, and customizable appearance behavior.
Creates a distibution of 2D points relative to an AR plane and stores them in a list.
Instantiates prefabs on the planes based on data from PoissonDiscSampling.cs with options for alingment, only being created on unique planes, and to show objects at creation time. There is also a public UnityEvent
OnObjectsPlaced
that is Invoked with a reference to the list of created objects and the initial collision position.
Listens to to the OnObjectsPlaced
event to have a create a unique visual to show the objects on the plane. It sorts the objects in "rings" and then loops through the rings to create a rippling grow effect centered around the collision position.
A utility script for using a lerp to scaling objects based on a in Quart tween.
a utility script for doing collision detection on AR planes and invoking an event with the position and AR plane.
A script for moving an object based on XR Hand joint ID pose data. Options for Direct transform setting or rigidbody move position.