Inspector

How to use the Morpheus Admin Inspector

NOTE: This page contains features that were added for release version v29. Some functionality described here won't be present in earlier versions.

Overview

The Morpheus Inspector is a tool that can be used in editor and live deployments, for debugging and moderation purposes. It has features such as being able to:

  • Hide and delete entities at runtime

  • Kick players

  • Test out/debug behaviors at scale, by viewing and modifying the network and rendering lod levels of entities at runtime

Features

View the entites in the deployment

In the top right of the UI, we have the list of entities currently in the deployment.

Actors in the actor list are optionally sorted by distance, and nearby actors will be clickable to select them in the entity list. Note the filter for different actor types in the top right.

Select a player

When you select a player, either via the list, or by clicking on them (if they are in the First Rendering LOD), it will highlight them with an orange box, and give you additional details about them, such as their network level and name. It will also give you further actions you can do to the specific player.

Kick Player

This will disconnect the owner of the actor you have selected.

OnKickPlayer on the MorpheusInspectorAdmin is triggered when this is done, so a project could bind to this event to e.g. add logic to ban users that are kicked in this way.

Hide Actor

This makes the actor hidden for all other clients (they will be unaffected on their own machine). You can do this if they are being a niusance, and getting in the way of things!

Delete Actor

This will destroy the actor on the server. This will delete it for all clients.

Doing this for player characters could lead to strange behaviour. If you're wanting to remove players, better to use Kick

Force Foreground

A local only control, for debugging purposes.

Forces the actor into the network foreground. This can be used to demo actors switching in and out of the network foreground

Has the following:

  • Max Entities In Foreground: Displays the current max entities in the network foreground. You can modify this text box to modify the number on your local machine

  • Max Entities In Midground: Displays the current max entities in the network midground. You can modify this text box to modify the number on your local machine

NOTE: The number in the midground includes all the number in the foreground. Therefore, Max Entities In Midground must be >= Max Entities In Foreground. If you want 3 foreground entities, and 3 explicitly midground entities, you would want Max Entities In Midground to be 6.

For more info on these, see Network Levels

Has the following:

  • Total Entities in LOD0: Shows the number of entities currently in the deployment in the first rendering LOD (those with real actors)

  • Total Entities in LOD1: Shows the number of entities currently in the deployment in the second rendering LOD (those represented by the animated crowd)

  • Max Entities in LOD0: Displays the current max entities in the first rendering LOD. You can modify this text box to modify the number on your local machine.

  • Highlight crowd members: If you tick this box, animated crowd members will be highlighted with translucent boxes, to make determining who are crowd members easier. This is the same as using the AnimatedCrowd.Debug.DrawBoxes 1 console command from Animated Crowd Console Commands.

  • Randomize LODs every [X]s: If this is ticked, instead of using your camera's location to determine the rendering LODs, we randomize them every [X] seconds on your local machine. This can be used to make all the characters randomly shift their priorities, and so switch between LOD levels. You can use this to observe how characters behave when changing LOD levels (this can be useful for e.g. debugging Actor Pooling related issues)

For more info on the rendering LOD levels, see The Animated Crowd

How to open the inspector

By default, the Inspector can be only opened with the command Morpheus.Inspector.Admin.

Note that as the Inspector is only accessible via a console command, you'll only be able to access it from a non-Shipping client. This doesn't mean that hacked Shipping clients won't be able to run this command though!

To expose the ability to access the Inspector without a console command, in your project you can call RequestEnterAdmin and ExitAdmin from the client MorpheusInspectorAdminSingleton singleton.

Determining who can access the inspector

The server determines which players have permissions to open the Inspector. The default Inspector only allows permissions for users with the Director role (or any role/character with the Capabilities.Morpheus.InspectorEnabled capability) to open the Inspector.

Extending the inspector

To change the permissions for who can access the Inspector, or to extend its functionality, you will need to create an Inspector singleton class that extends from Morpheus Inspector Admin Singleton and set it as the Inspector Admin Singleton Class in your project's world settings.

This singleton class implements CanEnterAdmin, which determines which players can access the Inspector panel, and has the Admin Class field which determines which admin panel actor is spawned. The admin panel actor is the actor that determines the behaviour of the Inspector.

Last updated