The Luna Debugger is a powerful tool that allows developers using Luna Playable to inspect and debug develop builds directly in the browser. The interface will be familiar to users of the Unity Editor, we’ve incorporated similar components like hierarchy and inspector panels so that you can debug a Luna Playable build in real time just as easily as you would a Unity scene.
The tool is available to all Luna customers as a free browser extension in the Chrome Web Store.
How to get started
- Install the Luna Debugger Chrome extension from the Chrome Web Store
- Open a Luna Playable develop build in Chrome
- Use the keyboard shortcut Option + ⌘ + I (on macOS), or Shift + CTRL + I (on Windows/Linux), to open the Chrome DevTools panel
- At the furthermost right of the DevTools tabs you should now see Luna, click this to open the debugger
Once the Luna Debugger is displayed in DevTools, you should see the hierarchy and inspector panels populated with information related to your scene in the develop build. What you’re seeing is a live representation of your build’s object hierarchy in the Luna engine.
Additionally, most of what you see in the inspector panel is editable in realtime and we provide tools to move freely around the scene and pause it.
Here you can see the full hierarchy of all game objects in your exported build, you can click game objects to open them in the inspector panel and expand child objects. The hierarchy panel is useful for a number of reasons whilst debugging your build:
- Determining whether a game object is instantiated and active in the scene
- Determining whether a game object is a prefab
This is where you’ll find the values and attributes that apply to a game object in your scene. All the fields displayed in this panel are editable and any resulting changes can be observed instantly in the running scene. Viewing and editing game objects here can useful for the following reasons:
- Activating disabled game objects
- Changing the position, rotation and scale of an object
Change the layer of an object. This can be useful if something is not visible when you expect it to be, sometimes changing the layer can help you identify the cause. Determining which components a game object has and which are disabled Checking to see how a component behaves in the Luna engine when you change its values, so you can find the optimal configuration for Luna
There are some limitations of the inspector panel and what we show there, those are detailed here.
Scene Camera & Scene Pause
You can use the scene camera to move freely around a scene. Simply click the running scene and drag in the direction you want to move the camera in. Scroll to move the camera backwards or forwards or use the W, S, A, D keys, and the Q and E keys to move up and down.
Pause can be used to stop the running of the scene arbitrarily and see the state of the scene in that frame.
- Collider highlighting: You can use the debugger to highlight colliders in your scene so that you can identify their position, size and shape easily
Luna particle system support: In the inspector panel, if you are viewing a game object with the particle component used, we will highlight in red any features unsupported by the Luna engine
Game object logging: You can right click a game object in the hierarchy panel and log it to the console. This will log the entire object in JS to the browser's console.
The follow component types are supported in the inspector panel:
- Curve (Not editable)
- ColorGradient (Not editable)
- AssetReference (Not editable)
- ComponentReference (Not editable)
Currently, the Luna Debugger has the following limitations to be aware of:
- Inherited fields in the Inspector panel are not properly ordered
- Enum’s are stored as integers for user-created classes
- Curves and colour gradient are not supported for editing
- In the particle system, angles are stored and displayed as radians instead of degrees