Developing for iOS
Download our Unity plugin here.
Beginning in version 3.2.0 of our Unity plugin, you can now develop applications for iOS.
Given the limited compute available on iOS devices, we recommend using very low polygon models. We typically create scenes with around 50,000 total polygons.
We are actively developing an optimized renderer for iOS. If you're interested in being a beta tester, please fill out this form.
Setting up your scene
We highly recommend starting with our sample scene โ sample scene 9 - iOS Sample Scene
. This scene has an existing UI that handles the calibration loading logic and an example with interaction, framing, and a model for you to base your scene off of.
Editing the UI
Under the Canvas object in the scene hierarchy, you'll find several objects that handle calibration loading:
PageGetStarted โ introduces the user to the app
PageConnect โ prompts the user to connec their iOS device to their Looking Glass
PageSetupCalibration โ guides the user through the calibration loading process
DemoUI โ the UI that will be displayed when the user has finished the calibration loading process
PopUpCalibrate โ a popup that appears when an existing calibration is loaded, informing the user which calibration is being used, and giving them options to test the calibration and load a new one
PopUpTestImageVerify โ guides the user through the test image verification step
Any of these pages can be adjusted or rebranded, however we strongly recommend you keep the user flow in-tact as these steps are critical to onboard your user successfully.
The exception to this is the DemoUI object, which is intended to be replaced with whatever UI you'd like to show for your UI after the calibration process is complete. If you delete the DemoUI outright, you should add your UI element to the list of pages on the DemoIOSUIController
component on the Canvas.
Editing the demo scene
The game object "DEMO" is what will display on the Looking Glass device once the calibration has been loaded. It features a bronze ox sculpture that the user can rotate and relight. It also features an alcove backdrop with shadow casting, which we feel is the best way to highlight content in Looking Glass devices (see our 3D design guidelines for more details).
The simplest way to view your own content on the Looking Glass is to delete the ox sculpture and replace it with your own model. Simply delete the "Model Ox Head" game object and create a new object containing your model (note โ there is a reflection probe child of the Model Ox Head object, you may want to retain this).
Once your model is in the scene, replace the "Target" object on the ModelController
component on the DemoManager object.
Additional customization is possible from here. You can replace the entire demo setup with your own content, interactions, lighting, and more. If you do so, it is best to place your new scene under a parent holder object so it can be managed by our calibration loading logic. Then, set this holder object as the "Template Scene" on the DemoiOSUIController
component.
Building your scene
Our Looking Glass Unity plugin is built to be compatible with Unity's standard iOS build system.
To build for iOS, select File -> Build Settings. Add your scene and select the iOS build target from the list of potential targets. If you haven't installed the build dependencies for iOS, you can do so through Unity Hub.
You can set the "Run in Xcode as" setting to either "Release" or "Debug" depending on your needs.
Select build and open the generated Xcode project in Xcode (note that you must be on MacOS for this stage of the build process). Select your target iOS device from the list of devices in Xcode, configure your signing certificates, and build for your device.
See more details on Unity's documentation site.
Script reference
See our scripting reference for the list of scripts used to support iOS and our sample scene.
Last updated
Was this helpful?