Skip to content

Adding Frame3 to an Existing Empty Unity Project

Ryan Schmidt edited this page May 24, 2017 · 2 revisions

Initial Scene Setup

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:

  1. 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.

  2. Create a new Unity Scene, or open an existing one if you are adding F3 support.

  3. Create an empty GameObject and give it a name (Frame3Context is an excellent choice)

  4. Create your scene config script (example ), which will likely also require a Cockpit setup script (example )

  5. 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
  6. 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.

  7. Press Play. You should be able to run without errors at this point.

Clone this wiki locally