Introduction

OpenCAGE's script editor comes paired with a level viewer, which links to the script editor to render your changes in a 3D space, making positioning triggers, models, and markers a breeze.

Read this guide to get familiar with how to set up and run the viewer, as well as how to operate its controls.

Setting Up

Setting up the level viewer is simple! First, open the script editor through OpenCAGE by clicking "Edit Cathode Scripts". From here, navigate to "Options", then "Level Viewer".

If you've already got everything you need to run the level viewer installed on your system, you should see a button named "Open Level Viewer" - in which case, you can skip this step!

If you see "Set Up Level Viewer", you're missing some components - not to worry, just press that button and the setup process will begin.

The level viewer requires Unity 2022.3.9f1. The setup window will download the installer and launch it for you. Once the Unity setup is visible, follow its steps (install it wherever you want).

When Unity finishes installing, you should recieve a success notification within the script editor.

Using the Level Viewer

To launch the level viewer, within the script editor select "Options", "Level Viewer", then "Open Level Viewer". Make sure you have the "Connect to Level Viewer" option selected within this same menu! You should see a new Unity instance begin loading.

After Unity loads, open a level in the script editor. It should begin loading in Unity, and eventually be visible as the full level - this is the level viewer!

Now, any changes you make in the script editor should be reflected over in the level viewer. Try changing the position of a composite or ModelReference entity, or adding in a new one!

Top tip: make sure to launch the level viewer before you make any changes (or, save first if you've made some), otherwise things will get out of sync.

If you start to notice things getting synced incorrectly, close the level viewer, save in the script editor, and then press "Open Level Viewer" again.

Moving the Camera

To look around the scene in the level viewer, hold the right mouse button and drag around. Whilst doing this, you can use WASD to move the camera in 3D space.

When you select an object in the script editor, it will also be selected in the level viewer. You can press the F key on your keyboard to focus the camera on the object - or alternatively, enable the "Focus On Selected" option in the script editor to have this happen automatically every time.