-
Notifications
You must be signed in to change notification settings - Fork 36
Home
RealityUI is a collection of User Interface classes for RealityKit. The classes included in RealityUI aim to offer familiar User Interface guidelines, but in a 3D setting for Augmented and Virtual Reality through RealityKit.
The User Interface controls in this repository so far are made to be familiar to what people are used to with 2D interfaces, however the plan is to expand the tools on offer to new and unique controls, which are more appropriate for an Augmented Reality and Virtual Reality context.
- iOS 13 or macOS 10.15
- Swift 5.2
- Xcode 11
Add the URL of this repository to your Xcode 11+ Project under Project > Swift Packages
.
https://github.com/maxxfrazer/RealityUI.git
Add import RealityUI
to the top of your swift file to start.
All components used in RealityUI must be registered before they are used, simply call RealityUI.registerComponents()
anywhere in your app before any classes starting with RUI
are initialised to avoid issues with that. For more information on what is meant by registering components see Apple's documentation here.
If you plan on using RUISwitch or RUIStepper, then you should at least enable .tap
RUISlider uses .pan
, but I would just recommend using .all
to avoid issues, as these will inevitably move around ad RealityUI develops, and will not interfere with the rest of your RealityKit scene.
RealityUI.enableGestures(.all, on: arView)