-
Notifications
You must be signed in to change notification settings - Fork 47
Adding Frame3 to an Existing Empty Unity Project
It is recommended that you start with a sample scene from the frame3SharpSampleApp repository. However if you must start from scratch, here is how you do it:
-
Add G3_USING_UNITY to the Scripting Define Symbols Field in Player Settings (under Edit/Project Settings submenu). If you are not using VR, also add F3_NO_VR_SUPPORT. You use a semi-colon between defines here.
-
Create a new Unity Scene, or open an existing one if you are adding F3 support.
-
Create an empty GameObject and give it a name (Frame3Context is an excellent choice)
-
Create your scene config script (example ), which will likely also require a Cockpit setup script (example )
-
Assign the scene config script to the Frame3Context GameObject you created in step 2
- If you are using gsUnityVR Auto-Configuration, Drag the existing Main Camera in the scene into the VR Camera Rig slot for this script, and check Auto Config VR
-
Add the following Layers (Layers button in the top-right, then Edit Layers at the bottom of the popup menu):
- 3DWidgetOverlay
- HUDOverlay
- UIOverlay
- CursorOverlay
You can add these in any of the empty layer fields, but you should keep the relative order.
-
Press Play. You should be able to run without errors at this point.