Sites

Menu
These are the docs for 13.6, an old version of SpatialOS. The docs for this version are frozen: we do not correct, update or republish them. 14.2 is the newest →

The modular Inspector (alpha)

This page tells you all about the new modular Inspector (alpha). It highlights how to access it, how to use it and how to get the best out of it.

The alpha version of the modular Inspector doesn’t enforce limits on the breadth, complexity and result sizes of queries, and as such can adversely impact the performance of the Runtime if used without caution. For more information on the general performance impact of the Inspector, see Performance impact.

What’s new

We’ve built the modular Inspector with a focus on customization. This has allowed us to provide several significant improvements:

  • See more of the data that’s relevant to you

    The entire application is now query-based, meaning that you can restrict the data you get back from your deployment. This means you can see more of the data that’s relevant to your current use case. For example, you could restrict your query to only show you the players in a world by constraining your query to only return entities with a PlayerController component.

  • Customize how you see your data

    The entire application is now modular, and you can customize and link together the modules based on your current use case. This allows you to tailor your workspace (collection of modules) depending on what you require. For example, in order to analyze a playtest in real time, you could set up the workspace in a way that allows you to see and select all your players in one viewport, and then automatically follow them around in another, more detailed viewport (see the video below). In the future, you’ll be able to save the workspaces you create.

  • New ways to see your data

    You can now not only see your data in a viewport or in an entity details panel, but also in tabular format. You can visualize component data in a table, and select which components you want to see in the columns. All the values update in real time.

Getting started with the modular Inspector

In this video, we dig into accessing and using the modular Inspector:

Advanced uses of the modular Inspector

This second video shows you how to get the most out of the modular Inspector by walking you through an example of how to build a custom workspace:

Accessing the modular Inspector

You can access the modular Inspector for local and cloud deployments.

  • For a local deployment, access the modular Inspector at http://localhost:21000/inspector-v2/. (The SpatialOS CLI also prints out this URL when you launch a local deployment.) When running locally, the Inspector automatically downloads and caches the latest Inspector Client from the internet. If it can’t download the latest version (for example, because there is no internet connection or because of the firewall configuration), it uses the latest cached version instead.

  • For a cloud deployment, access the modular Inspector by opting in from the old Inspector:

    Try the new modular Inspector button

Queries and constraints

Queries and constraints are a new concept in the modular Inspector. You can find them in the query editor module, and you use them to define and restrict which entity data is streamed from your deployment.

Query editor module

You define queries using one or many constraints that you can combine with each other. This is essentially the same querying mechanism as query-based interest, just with a visual interface.

Different constraint types

Compositional constraints

You can use these constraints as building blocks to link other constraints together and build complex queries.

Constraint type How it works
AndConstraint For an entity to appear in the query result, all of the sub-constraints need to be true
OrConstraint For an entity to appear in the query result, one or many of the sub-constraints need to be true
NotConstraint This constraint negates anything that is attached to it as a sub-constraint. For example, you could attach an EntityIDConstraint to show all entities but a specific one.

Spatial constraints

Spatial constraints only return entities whose positions are in the area defined.

Constraint type How it works
BoxConstraint This constraint defines a box in your game world. You can define it by defining two (opposite) corners of the box.
SphereConstraint This constraint defines a sphere in your game world. You can define it by selecting a center point as well as a radius.
CylinderConstraint This constraint defines a cylinder in your game world. You can define it by selecting a center point as well as a radius - its top and bottom bounds are infinite.

Entity and component constraints

You can use these types of constraints to filter for specific entity characteristics. This can help you narrow down a query to only specific kinds of entities.

Constraint type How it works
ComponentConstraint This constraint only returns the entities that have the specifiec component attached to them. If you have an entity that has a unique component attached to it (for example, if only player entities have the PlayerController component) you can use this constraint to filter for only this kind of entity.
EntityIDConstraint This constraint only returns the entity with that specific entity ID. You could use it to find a specific entity in your game world.

Non-conditional constraints

Non-conditional constraints act as a catch-all for situations where you do not want your query (or sub-query) to depend on a condition.

Constraint type How it works
TrueConstraint This constraint always returns all entities.
FalseConstraint This constraint always returns no data.

Using constraints

Constraints live in the query editor module. You can only create one query per query editor module. You can add, modify, remove, or move constraints to make up the query.

Adding a constraint

Add a constraint by clicking the (+) button in the query editor module. From there you can choose which type of constraint you want to add.

Modifying a constraint

You can modify a constraint by typing into the text boxes that define it.

Removing a constraint

You can remove a constraint by clicking its drop-down menu and selecting Delete. Note that you can’t remove dynamic constraints - instead, you need to delete the connection that’s inputting the dynamic constraint into the query editor module (turn on Edit Mode and then click the icon in the centre of the connection).

Moving a constraint

You can move constraints around by dragging them. This is useful when you want to change the nesting structure of your query.

Dynamic constraints

You can dynamically pass a constraint to a query editor module, and it will be added to the query. For example, when you want your query to be constrained by the bounds of a viewport, you can pass in these bounds as a constraint by outputting the constraint from the viewport into the query editor (you’ll need to turn on Edit Mode).

Note that constraints that are passed in dynamically are marked with a locked icon. This means that modification is limited (the constraint is set dynamically by the module that is passing it in). You can, however, still nest and re-order these constraints.

Streaming components

In the query editor, you can choose which components you’re interested in. Only these components and their values are returned in your query. This is helpful if you’re interested in only a particular subset of components, and helps you manage the amount of entity data that is being processed and streamed.

Known limitations

  • The alpha version of the modular Inspector is solely focused on entity data, and does not include any worker data. This was a conscious decision from our side in order to let you experiment with it earlier and give us feedback. We’re planning on exposing worker data in a later release.

  • Currently, you can’t save workspaces (configurations of modules). Again, we’re planning on providing this in a later release.

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums