Luna Debugger

Overview

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.

luna-debugger

How to get started

  1. Install the Luna Debugger Chrome extension from the Chrome Web Store
  2. Open a Luna Playable develop build in Chrome
  3. Use the keyboard shortcut Option + + I (on macOS), or Shift + CTRL + I (on Windows/Linux), to open the Chrome DevTools panel
  4. 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 real time and we provide tools to move freely around the scene and pause it.

Hierarchy Panel

luna-debugger

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

Inspector Panel

luna-debugger

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
luna-debugger

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.

Any changes that you apply using the Luna Debugger are not permanent and will be reset once you refresh or close the page. Changes are not written to your export and do not impact the final playable.

Scene Camera & Scene Pause

luna-debugger

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.

luna-debugger

Pause can be used to stop the running of the scene arbitrarily and see the state of the scene in that frame.

Other features

  • 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-debugger

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

luna-debugger

Limitations

The follow component types are supported in the inspector panel:

  • Int
  • Float
  • Boolean
  • Text
  • Layer
  • Color
  • Vector
  • Rect
  • Enum
  • 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