Skip to content

Hubs scene debugger

Manuel Martin edited this page Dec 18, 2023 · 7 revisions

The Hubs scene debugger allows Blender users to easily iterate over assets creation without leaving Blender. You can use it to iterate over scenes, avatars or any other asset that you are planning to use in Hubs.

The debugger uses Selenium to create a browser instance where a Hubs room will be running. The add-on will export and update the room when using the debug local scene mode or spawn the Blender scene in Hubs if running in spawn object mode.

Setup

Installing dependencies

As the debugger depends on Selenium, first you'll need to install the selenium python dependencies for the debugger to work. You can do this from the Hubs add-on preferences.

Screenshot 2023-12-18 at 13 47 41

Settings

The debugger has a few configuration options:

  • Browser: The browser that will be used for running the Hubs session.
  • Delete browser profile: The add-on will create a browser profile separated to your local browser profile. The profile stores things like settings, cookies, local storage, etc. You can delete the profile if you want to completely remove the profile.
  • Override executable path: In some operating systems selenium might have trouble finding the browser executable. In case you find issues with it, you can manually specify the path to the browser executable.

Uninstalling dependencies

If you experience any selenium issues running the scene debugger you can try to remove the dependencies. The force option will completely remove the dependency folder when uninstalling.

Using the scene debugger

Session status

The first panel in the scene debugger indicates the status of the debugging session. The possible states are:

  • Waiting for room: The browser session has not yet been created
  • Entering the room: The session has been opened, but the user is not yet in the room. You won't be able to update the scene in this state.
  • Waiting for sign in: You are int he room, but you are not yet signed in the Hubs session. This will limit the debugging types, and you'll only be able to spawn objects, but not to update the room scene.
  • In room: You are in the room and the user is signed in. In this state, you will be able to update the room scene or spawn objects in the scene.
Screenshot 2023-12-18 at 14 03 15 Screenshot 2023-12-18 at 14 12 43 Screenshot 2023-12-18 at 14 04 14 Screenshot 2023-12-18 at 14 03 54

Adding instances

The first thing that you need to run a debugger session is to add a Hubs instance. By default, the Demo Hubs instance is added, but you might want to add/remove your own set of personal Hubs instances using the add/remove buttons. The instance URL has to point to the landing page of your instance, and it can be:

  • Local instance: This is usually Hubs client instance running in localhost or a full Hubs stack run using Hubs Compose. It's usually reached at https://hubs.local:8080
  • Subscription service instance: An instance created using the Hubs Managed Service.
  • Demo instance: The public Hubs demo instance.
  • Other: Any other instance type or a compatible instance type using the same code base.
Screenshot 2023-12-18 at 14 18 34

Adding rooms

You can add save rooms URLs using the rooms panel. Clicking on the add button will add a new URL to the list that you can edit to add your room URL. When in a room, the add button will add the currently opened room URL to the list.

Screenshot 2023-12-18 at 14 22 06

Opening a room

To start debugging, you need to have a Hubs room opened. You can open a room in two different ways:

  • Create: This will create a new room in the selected instance from the instances list.
  • Open. This will open the currently selected room from the rooms list.

If a browser session does not currently exist, this will open a new browser windows and load the room URL. If the browser session already exists, it will load the room URL in the currently opened session.

Screenshot 2023-12-18 at 14 18 34 Screenshot 2023-12-18 at 14 22 06

Closing a session

You can close the currently opened browser session by clicking on the Close buttons.

Room flags

The Hubs room will be opened using a set of flags that you can choose using the room flags panel.

Screenshot 2023-12-18 at 14 43 18

The flags will only take effect when creating or opening a room and won't have any effect while a room is opened. On the left side of the panel you can see the flag that will be used in the next room load, while on the right side you can see the flags that are used in the currently opened room.

  • Use new loader: This will make the opened room to use the new ECS based loader instead of the A-Frame based loader.
  • Show ECS debug panel: The ECS debug panel is a side panel that shows the hierarchy of currently loaded entities in the scene. This is specially useful if you are using the new loader or if you are doing some custom client development.
  • Skip entry: This flag will omit the entry setup modals that show up when joining a room and will take you straight into the room. You will have to at least go through the setup modal once before it works.
  • Allow scene update: This flag enables the scene update in the room. If not checked, the current Blender scene will be spawned in the room as an object instead of replacing the current scene. The room scene update mode will only work if the user is signed in the room.

Scene debugging

Scene update mode

As mentioned before, there are two debugging modes:

  • Update scene: The Update scene mode will be enabled when using the Allow scene update flag if the user is signed in the Hubs room. When in this mode the Hubs room scene will be replaced with the current Blender scene when clicking the update button.
Screenshot 2023-12-18 at 14 37 06
  • Spawn as object: When in object spawning mode the current Blender scene will be spawned as an object in the Hubs room as if you would be drag&dropping it in the room. This relies on the room permissions so make sure that the Spawn object permission is granted for the user, otherwise it won't work.
Screenshot 2023-12-18 at 14 37 57