The Inspector provides modules that you can use to configure and link together to set up a workspace tailored to your use case.
Learn about the following modules available in the Inspector:
- Query editor: Query for subsets of data from your SpatialOS deployment, and then pass the data on to other modules.
- Viewport: Get a live, 2D view of the position of entities in your deployment.
- Viewport settings: Customize how the entities are displayed.
- Entity details: See subsets of data passed in from the query editor, and check entities and component values.
- Entity tables: Investigate specific entities in details.
- Worker table: Get an overview about all the workers in your deployment.
- Worker details: See detailed information about a specific worker instance.
- Text: Describe a workspace or give instructions to the users.
By linking the modules together, you output data or configurations from one module to another one. As a result, you can visualize data specific to your use case.
To see data that’s relevant to your use case, you always get started with the query editor. In the query editor, you run a query to get subsets of data that you are interested in from your SpatialOS deployment, and then pass the data on to other modules.
A query is made up of one or multiple constraints that you combine with each other. For more information about queries and constraints, see Creating queries.
In addition, you add components for streaming so that only these components and their values are returned in your query. This helps you manage the amount of data that is being processed and streamed.
In the following use cases, you use the query editor to restrict the data that you get back from your deployment:
- When you are only interested in a specific type of entity, use the component constraint and choose the components that only exist on that entity. For example, to look at only the players, choose the
player_controlscomponent that is specific to the player entity type.
- To filter for a specific entity, use the entity ID constraint to view only that entity with the ID.
In the viewport module, you can get a live, 2D view of the position of entities in your deployment. You can see where your entities are, and how they are moving about.
In the following use cases, you use the viewport module to view your entities:
- To make a minimap of your world: You can understand where certain entity types are located in your world, debug AI and impacts of your level design. Take deer as an example: you want to know where deer are located in your world, where your deer went, and why there are no deer in this part of the world.
- To debug replication issues: The viewport shows you when the position of an entity is being updated, so you can check whether entities are moving.
- To track players: You can follow certain players while they are playing the game to better understand their movement in game as well as their interaction with other players or entities.
Meanwhile, you can visualize worker write access and interest. For more information, see Visualizing authority and interest.
In the viewport settings module, you can customize how certain entity types are visualized in the viewport module. You can choose the icon, color and opacity used to display each entity type available in the deployment.
The following screenshot shows an example of the settings, where opacity ranges from
Viewport settings example.
In the following use cases, you use the viewport settings module to customize how entities are displayed:
- To filter what you see: You can reduce the opacity of certain entity types that you are not interested in.
- To group entities: You can group entities by type as a specific icon, and then differentiate via colour. For example, you can group AI as the square icon and further differentiate deer from others using the brown color.
The entity table module shows subsets of data passed in from other modules such as query editor. You can use the entity table to populate the table with only the components that you care about so that you can quickly check their entities and component values.
To see the data of a component in the entity table, ensure that your query and components streamed in the query editor include this component; otherwise, you can see only missing in that component column.
In the following use cases, you might use the entity table module:
- To debug replication issues by finding outliers of a given component value on specific types of entities.
- To understand the impact of game design decisions by observing the state of many entities of the same type, for example, how many of my Deer AI are unhealthy.
When you create a new entity table in a workspace, you see only the entity ID column by default. You can add one or more columns that represent components available in the deployment.
To speed up iterations with your entity table, turn on the Edit mode, and output Component names from the entity table to the query editor that serves the entity table. Then, when you add any columns to your entity table, components streams are added in the query editor automatically. However, if the query that serves the module doesn’t have a component that you’re looking for, this tip doesn’t work.
In addition, you can visualize worker write access authority over components from the entity table. For more information, see Worker write access authority.
In the entity details module, you can investigate specific entities in detail. The following examples show the use cases where you might use the entity details module:
- To debug replication issues by looking at all the component values of a single entity.
- To get a live view of a player's state by looking at all the component values of that player.
Note: The components for entities streamed into the entity details module depend on your query and subsequent components streamed.
By default, only the following components are streamed from the query editor, so only these components appear in the entity details module:
You can view more of the entity details relevant to your use case using one of the following options:
To view specific components of entities:
In the query editor, define your query, add these components for streaming, and output the entity data to the entity details module. Then, you can see all the qualified entities and each entity lists only the components streamed. This is helpful when you rely on these components repeatedly.
Note: When you drill down to a specific entity, you can click Stream full entity to see all the components available to that entity.
To view all the components available to entities:
In the query editor, define your query, select All In the Components streamed section, and output the entity data to the entity details module. Then, you can see all the qualified entities and each entity lists all the components available to each entity.
This option requires more data to be streamed from your deployment, so it can impact the deployment performance that you’re inspecting.
To search for an entity in the running deployment:
In the entity details module, enter the entity ID in the search bar. Then, the entity is added to the module and you can see all the components available to this entity.
Note: This entity in the module remains regardless of input from other modules. For example, if you output selected IDs to the entity details mode, which doesn’t include this entity ID, this entity still exists. You can remove this entity by clicking the delete button on the tab.
In the worker table module, you can see all the worker entities available in your deployment. This module also shows player information, for example
Player Id, if the worker entity also has the
Worker table example.
To see the data of worker instances in this module, ensure that your entity data that includes these components is streamed into this module, as is shown in the following screenshot:
Entity data for worker table.
The components of each worker entity that you see in this module are worker entity fields. For the full list of fields and their description, see Worker entity fields.
In the worker details module, you can see detailed information about a specific worker instance that you’re interested in. The information includes:
Worker details example.
You type the text in this module to describe the current workspace that you’re working on or to give instructions to users.
For example, you can see the following text module by default in the Comprehensive workspace, but you can also edit it based on your own needs.
2019-11-25 Page added with limited editorial review
Updated 7 months ago