Skip to content

Inspector

Tom_XV edited this page Sep 23, 2026 · 7 revisions

English | 日本語

Experimental, and it stays that way. The Inspector library is DragNWash.ModFramework.Inspector.dll, in the namespace DragNWash.ModFramework.Inspector, and it came out with framework 1.2.0. It may change or go away, and an edit you make with it can break the running session. The framework's release includes it, but a mod's release can ship the Tool window without it (Drag'n Wash Localization does).

Looking for how to turn it on? See Installing just below.

Installing

The Inspector is not in the installers that mods ship, and Drag'n Wash Localization leaves it out, so you have to install it by hand:

  1. Download DragNWash.ModFramework-<version>.zip from the framework's releases.
  2. Copy its BepInEx/plugins/DragNWash.ModFramework.Inspector folder into the game's BepInEx/plugins folder.
  3. Start the game and turn on Developer tools (Options → Mods → Drag'n Wash ModFramework).
  4. Press F1 and open the Inspector tab.

To remove it, delete that folder.

What it is

It's an Inspector tab in the Tool window (F1, with Developer tools on). It shows the scene's objects, their components and materials, and every field and property, and you can read and edit all of it while the game runs. It's what Unity's own Inspector does in the editor, for a game you only have as a build. It's meant for people who make mods and want to know "what is this thing, what's it called, what value does it hold", and who want to try a change before writing a line of code. Players never see it.

  • Use it to find things out: the name of the object behind a sign, the component that drives the door, the counter's material and its shader, the field that holds the scrub speed. Anything a mod's GameHooks.Require or AssetReplacements needs a name for, you can find by looking instead of decompiling.
  • Use it to try things. Change a value and you see it in the game straight away. Nothing is saved, so an edit lasts until the scene reloads or the game quits. To keep edits, see Export as overrides.
  • It isn't a RuntimeUnityEditor. There's no REPL, no calling methods with arguments, no adding or removing components and no instantiating prefabs. RuntimeUnityEditor opens its own window and takes over the cursor and input, so it and the Tool window will fight. Use one or the other, not both.
[BepInDependency(Inspector.Guid, BepInDependency.DependencyFlags.SoftDependency)]

The tab

  • The toolbar has ☰ Tree (the hierarchy, on demand), ◎ Pick, ↑ Parent, Edit ▾ (Move / Rotate / Scale, Edit mesh vertices, Reset transform, Reset mesh), View ▾ (Highlight, Bones, Wireframe, Free camera, the debug view), ◐ History, ↺ Refresh, ? (the keys, see Keys; 1.5.0) and a search box. The menus stay inside the window and scroll when they're long (with the wheel or, in the 1.5.0, a gamepad's stick), and nothing under an open menu reacts to the pointer. The menu items and the Tree and Pick tooltips show the key that's set for them, like "Bones (B)", and show no key when the action has none (1.5.0). Under the toolbar there's a breadcrumb of the selection's path, with a button for each ancestor.
  • View ▾ is split under headings (1.5.0): OVER THE GAME (Highlight the selection, Bones, Wireframe, Free camera), DEBUG VIEW (PICK ONE) (its three scopes), IT SHOWS (colliders and triggers, lights, rigidbodies), HOW IT DRAWS (the settings for the whole debug view) and IN THE PANE (Rigidbodies list, Scenes and levels). The debug view's scopes, where only one can be on, have round marks, and the rest get a tick when they're on (x and * when the window font has no such marks).
  • Search looks for objects by name. From 1.5.0 a line over the results says what it found, like 3 objects match "wheel", Nothing matches "whel". or The first 500 are shown; type more to narrow it. It also takes t:Rigidbody (any component type) the way Objects does, for the objects that have that component, and you can add a name after it to narrow it down. A t: search runs once you stop typing, since it looks through every object of that type, and a name that no component type has is reported as such. In a narrow window, typing in the search takes you to the results page.
  • Pick lets you click an object in the game. It looks at uGUI elements first, then at the renderer with the smallest screen bounds around the pointer, so no collider is needed. The mouse wheel walks through overlapping candidates, and the one that would be picked is outlined and named. Highlight keeps an outline and a name tag on the selection.
  • Components show up as a strip of buttons over the members (a renderer's materials are among them). Then come the members: public ones first, private ones behind Show private, all read live on every repaint. Hold values stops that reading, and the game keeps changing the values meanwhile (this button was called Freeze before 1.5.0). A Transform shows position, rotation and scale first, and All members shows the rest. Setting a value through a private field is at the mod author's own risk.
  • From 1.5.0 the members get their own Filter members field, with a count like "14 of 62" beside it. It keeps what you typed while you select other objects of the same type, and on a Transform it looks through all the members, not only position, rotation and scale. A name too long for its column ends in "...", and with the pointer on it the hint line at the bottom of the window shows the whole name and its type, like maxAngularVelocity : float (property). For a number it adds that you can drag up or down on the value. The header's buttons (Show private, Hold values, Enabled, Code) wrap onto a second line in a narrow window.
  • Every member row ends in a small ... button (1.5.0). It opens the same menu as a right click: the value now, Reset to original, Undo, Copy value, Copy name and Show in History. On a gamepad or the Steam Deck, which only click with the left button, that button is the way to the menu. The right click still works.
  • The selected row in Scene's tree and in Objects' list has an accent line on its left, and a name too long for the tree ends in "..." with the whole name on the hint line (1.5.0).
  • The views that take the members' place (History, Rigidbodies, Scenes and levels, Layers, Clips, Used by and Code) all have the same band on top in the 1.5.0. < Members is on its left and takes you back, followed by the view's name and a few words about it.
  • What happens after you press something shows in the notice strip at the bottom of the window (1.5.0). That covers Undo last and Ctrl+Z, Undo and Redo in History, Show private's warning, a Go in Used by whose object is gone, a texture's Assets button when the Assets library isn't loaded, and Export as overrides. A failure is red and a warning yellow. Used by and the first Graph of a session show what they're doing ("Looking where ... is used", "Reading the game's code...") in the middle of the tab before they start, so the window doesn't just freeze.

Objects: every loaded object

Experimental. This came in with framework 1.4.0 and may change or go away in a later version.

The toolbar starts with a Scene | Objects switch. Scene is the tab described above. Objects puts an explorer of everything Unity has loaded in the left pane, like Unity's Project window, and the right side stays the same members pane.

  • Everything is sorted into folders by kind, each with a count: Textures, Sprites, Materials, Shaders, Meshes, Audio, Animation, Fonts, Data (a folder per ScriptableObject type, the game's own first), Objects outside the scenes, and Other. Each row carries one short fact, like a texture's size and format, a mesh's vertex count or a clip's length. Show hidden adds what Unity marks hidden, and Close all folds every folder.
  • You can search by name, or type t:Material (any type name works) to see one kind.
  • Used by, on the header of the selected object, lists every place it's used: renderers, mesh filters and colliders, sprites, audio sources, animators and controllers, materials, and the fields of scripts and ScriptableObjects that can hold it. Each one has a Go. It stops at 2,000 places, and tells you how many objects it looked through and how long it took.
  • The members, editing, Reset and History work the same as in Scene. The first time you edit an object that several things share (a material on many renderers), it tells you so, once. GameObjects outside the scenes are read-only. They're templates the game keeps loaded, and they aren't in any scene.
  • The list is built in one pass when you open it, on Refresh and after a scene load (never on a timer), and the status line says how long that took. In a level with a customer it's about 8,500 objects in 70 to 120 ms. The list keeps instance IDs rather than references, so it never keeps an asset loaded on its own.
  • Each view keeps its own search text and its own selection, so switching back to Scene finds what was selected there.

Editing

Type Control
bool toggle
numbers a field. Type and press Enter or leave the field, or press and drag the field up or down. A value that can't be read is put back and the row says why
string a field
enums a button with the value and a small arrow. It opens a list of all the values with the one that's set marked, and you pick one. A long list opens at the value that's set (1.5.0; before that, each press stepped to the next value)
Vector2/3/4, Quaternion (Euler), Rect, Bounds, Vector2Int/3Int one field per component
Color, Color32 one field per channel, and a swatch that opens the colour picker (a saturation/value square, a hue bar, RGBA bars, hex)
UnityEngine.Object references the name and Go (a texture's Go opens the Assets tab on it); not editable
lists and arrays Expand, then one row per element. You can't add or remove elements
anything else shown as text, read-only

A property is only editable when it has a setter. If a setter throws, its error shows on the row and the tab carries on.

Materials

A material's members are its shader's properties (Float, Range with its limits, Int, Color, Vector, Texture) and its keywords, each with a toggle. A texture property shows the texture's name, size and format, with a Go that opens it in the Assets tab. You can't edit it here (texture replacements have their own path). Changing a material changes every renderer that shares it, and the pane tells you how many do.

Code view

Each component has a Code view. It shows the type and assembly, its methods, the Harmony patches mods have put on them (and whose they are), its UnityEvents' listeners, and a method's IL. The IL is read with Mono.Cecil, so for C#, use dnSpy or ILSpy on the game's files.

  • Copy gives you Type:Method, which AccessTools.Method and GameHooks.Require take as it is (Core API).
  • Patch copies a whole Harmony patch: the GameHooks.Require check, the [HarmonyPatch] attribute (with the parameter types, and how each is passed, when the name alone is ambiguous), and a Prefix and a Postfix with __instance, the game's own parameter names, ref where the game passes by reference, and __result. Paste it into your mod and fill in the GUID and the feature name.

Code graph

Experimental. This came in with framework 1.4.0 and may change or go away in a later version.

The Code view's Graph button (on each of the game's methods) and its Type graph button (for the whole type) open the code graph. That's the same code as a drawing, with a method's blocks and branches, what it calls, its callers, the patches on it and the events that lead to it. It needs the Bridge library, turned on in its tab of the F1 window. See Code graph.

Debug view, bones and meshes

  • Debug view (View ▾, under DEBUG VIEW (PICK ONE)) outlines everything of one kind at once: every renderer the camera sees, the selection's children, or whatever the search text matches. How it draws (of the selection only, collider and light shapes, screen rectangles, 3D boxes, names) is set under HOW IT DRAWS. It also shows colliders, triggers and lights of active objects, for the selection or the whole scene. Colliders and lights are drawn in their own shape, so a box is a box, a sphere is a sphere, a capsule is a capsule and a spot light is its cone. A convex mesh collider says so in its label.
  • A mesh collider is drawn as its wireframe when the mesh can be read. When only the physics engine knows its shape, it's scanned with rays from the six sides of its bounds. That shape is an estimate that can miss thin parts and hollows, and its label says so.
  • Bones (B by default) draws the armatures of skinned meshes, and you can click a joint to select the bone. Wireframe (N by default) draws the selection's meshes.
  • Edit mesh vertices (M by default) is experimental even within the Inspector. You drag a vertex of a copy of the mesh (GPU-only meshes are read back first), and History and Reset mesh work on it. Skinned meshes can't be edited, and nothing is saved.

Gizmo and free camera

  • Move / Rotate / Scale draw the object's local axes in the game view, and you drag an axis or its tip. A readout shows position, rotation and scale, and Reset transform (in Edit ▾) puts back what the gizmo changed.
  • Free camera (C by default) gives you a copy of the game's camera that you fly like Unity's scene view, with the right mouse button held (mouse look, W A S D, Q E, Shift to go fast, the wheel for speed). The flying keys can't be changed. The game's camera is disabled meanwhile, and it comes back when you turn the free camera off. The notice that shows when you start it names the key that stops it, whatever you've set, or only the button when the action has no key (1.5.0).

Rigidbodies

Experimental. This came in with framework 1.4.0 and may change or go away in a later version.

The game moves things with Rigidbodies, so the Inspector reads them, lists them and drives a few of their switches. Both Rigidbody and Rigidbody2D are covered.

  • In the debug view, View → Rigidbodies: centre of mass, velocity (under IT SHOWS; before 1.5.0 it read "centre of mass and velocity") draws a cross on each body's centre of mass and an arrow for where it's heading (a quarter of a second of travel at its current velocity). A tag gives its speed, turning speed, mass, kind (dynamic, kinematic, static) and whether it's asleep, and a sleeping body is grey. Of the selection only limits it to the selection and its children, as it does for colliders and lights.
  • View → Rigidbodies list shows every active body in the scene, or only the ones under the selection, in place of the members. You get each one's name, type and what it's doing, fastest first, with Awake only and a filter by name or type. Select opens a body and keeps the list open, so you can go through them one by one.
  • A selected body gets a line saying what it's doing, and buttons above its members: Stop (velocity and turning to zero), Kinematic (on and off, kept in History so Undo puts it back) and Sleep / Wake.
  • Pause physics (experimental even within the Inspector) keeps the bodies where they are, and Step moves the physics on by one fixed step. The game's scripts keep running, so any forces they add meanwhile arrive with the next step. Resume physics, closing the window or turning developer tools off will each put the physics back the way the game had it.

Animators

Experimental. This came in with framework 1.4.0 and may change or go away in a later version.

The game moves its characters with Animators, mostly by setting their parameters and layer weights.

  • Parameters and layer weights are rows at the top of a selected Animator's members. You can drag a number, switch a Bool, set a Trigger (true) or reset it (false). They're kept in History like any member. The game sets many parameters every frame, though, so an edit to one of those only lasts until the game writes it again.
  • Above the rows there's a line for what the base layer is playing. Layers lists every layer in place of the members (a dragon has more than ten), each with its weight, the clips it plays (with their weights when blended), how far through the state is, and the clips it's blending to.
  • Pause animation stops the Animator and remembers its speed. Step moves it on by 1/30 s, and in Layers a slider per layer puts the current state at any point. Resume animation, closing the window or turning developer tools off puts the speed back.
  • Clips (one of the Animator's buttons) shows the controller's clips in place of the members, each with its length, frame rate, whether it loops, its events, and what it's swapped for. Preview plays a clip on the Animator over what the controller plays, with a time slider, pause and Stop preview. Replace lists every clip loaded in memory, Use makes the controller play that one instead, and The game's clip puts the original back. A swap is kept in History (Undo goes back one swap) and restarts the Animator's states.
  • Some things can't be done in the game. The state machine (states and transitions) and the curves inside a clip only exist in the Unity editor. A state is only known by a number, so the clips it plays stand in for its name.

Scenes and levels

Experimental. This came in with framework 1.4.0 and may change or go away in a later version.

View → Scenes and levels opens a list in place of the members. The game has a few scenes (the title, PlayGame, the scenes after certain levels, the credits) and plays its levels inside PlayGame. Everything here is read from the game's own types, so if a game update renames them, these tools turn off.

  • While a level is running (in PlayGame), you see its number, dragon, weather, the dragon's state and how clean it is. Skip level and Clean the dragon call the game's own cheats. Skip ends the level as if you'd finished it, so the next one is saved as reached.
  • Levels lists every level with its dragon and weather, and Start plays that level now, in place of the current one. The flags that earlier levels would have set aren't set, so dialogue may differ from a normal play.
  • When a level ends, the game saves "the level played + 1", and when a scene ends it marks the scene as seen. So playing a level or scene out of order would move the save's progress back or forward. That's why Start, and Load of a scene other than the one in use, begin trial play. Until the title screen loads, the game's saves aren't written, and the pane says so. Skip level in a normal game saves just as the game's cheat does (the Flags and saves library keeps a copy of every save the game writes).
  • Scenes lists the scenes loaded, and every scene of the game with Load, which goes through the game's loading screen the way its menus do. Reload loads the active scene again.

History, Undo and Reset

There are two ways back. Undo and Redo go one edit back or forward, and Reset goes back to the value from before the first edit. (Before 1.5.0, History's Undo button was called Revert.)

  • Every edit (rows, gizmo, colour picker, one entry per change) is kept in the History view with the value before and after. Each entry has Undo, which turns into Redo once the edit is undone, and an undone edit is marked "(undone)". There's also Undo last (Ctrl+Z) and Clear. From 1.5.0 Clear asks first, since the edits stay applied and can't be undone after that. The results show as notices, like Undid drag: back to 0.05. or Redid drag: 2 again., and the log's lines read [inspector] Undid ... and [inspector] Redid ....
  • In a narrow window History's buttons wrap onto a second line, and an edit's long lines end in "..." with the whole text on the hint line (1.5.0).
  • Reset on an edited row puts back what it held before its first edit. Right-click a row, or press its ... button, for its value now, Reset to original, Undo: back to the previous value, Copy value, Copy name and Show in History. Right-click one x/y/z (or r/g/b/a) field to get the same for that component alone.

Export as overrides

Experimental. This came in with framework 1.4.0 and may change or go away in a later version.

With the Overrides library installed, the History view has Export as overrides. It turns your edits into a mod with no code, which the Overrides library applies every time the game starts.

  1. Make your edits, then open ◐ History and press Export as overrides.
  2. The form tells you how many values will be written and which edits can't be. Fill in Name (the mod's folder name; My changes at first), Author and Description, and press Export (Cancel closes the form). When there's nothing to write, Export is greyed out with the reason next to it, "Nothing to export yet." or "None of these edits can be overrides." (1.5.0).
  3. The mod is written to BepInEx/plugins/<name>: mod.json and overrides/main.json. A second export into the same mod adds a file. From 1.5.0 the files are written through a temporary file, so a write that's cut short never leaves half a file, and when the folder can't be written the form says so in red instead of the tab stopping.
  4. Type overrides reload in the Console, or restart the game, to run it as a mod. It shows up on the Mods screen, and you can switch it off there like any mod.

One row is written per place, with the value it holds now, and places that are back at the game's value are left out. Edits an override can't hold are left out with the reason. Those are list elements, mesh vertices, Animator parameters and clip swaps, and GameObject rows.

Keys

The keys work while no text field has the keyboard. From 1.5.0 ? opens a panel that lists them, and ? or Esc closes it again (Esc does that even while a field has the keyboard).

From 1.5.0 eleven of them are settings you can change. Until you change one, they're the keys the tab always had:

Action Setting in [Keys] Default
Move gizmo on or off GizmoMove (Gizmo move) W
Rotate gizmo on or off GizmoRotate (Gizmo rotate) E
Scale gizmo on or off GizmoScale (Gizmo scale) R
Put the gizmo away GizmoOff (Gizmo off) Q
Pick an object in the game (press again to stop) Pick (Pick) P
Highlight the selection Highlight (Highlight) H
The tree in Scene, or the list in Objects Tree (Tree) T
Free camera FreeCamera (Free camera) C
Bones Bones (Bones) B
Wireframe Wireframe (Wireframe) N
Edit mesh (experimental) EditMesh (Edit mesh) M

The name in brackets is how the Mods screen shows the setting. The settings live in the Inspector's config file, BepInEx/config/com.tomxv.dragnwash.modframework.inspector.cfg.

These keys stay fixed: the arrows, Home, End, Page Up and Page Down for the list, Ctrl+Z to undo the last edit, Ctrl+↑ to select the parent, Esc to close a menu, leave pick mode or put the gizmo away, and ?. The free camera's W A S D, Q E and Shift while you fly are fixed too.

Changing the keys (1.5.0)

  • In the F1 window, open the Inspector tab's ? panel and click a key. It says "Press a key…", and the next key you press becomes the new one, with Ctrl, Shift or Alt if you hold them. Esc stops without changing anything, and Backspace leaves the action with no key ("none"). A fixed key isn't taken, and a notice says so. Reset all keys at the bottom of the panel puts all eleven back to their defaults.
  • The same settings are on the Mods screen: Options → Mods, then Inspector (experimental) under Libraries (its full name is Drag'n Wash ModFramework: Inspector), the Settings tab and its Keys section. Each key there has a Change button that waits for a key the same way. It's the same setting in both places, so a change in one shows in the other.
  • When another setting uses the same key, in another mod or in the Inspector itself, the key gets a yellow bar in the panel and the same line the Mods screen shows under it, like "C is also used by Screenshot key (Photo Mode). Both will answer it." Only the key itself is compared, not Ctrl, Shift or Alt. One key for two things is allowed, and both answer it. (A mod with its own key window can show the same line; see ModFramework.SharedKeyNote in Core API.)
  • A key set without Ctrl, Shift or Alt still answers with Shift or Alt held, as it always did, unless another key is set to exactly that combination. It never answers with Ctrl held.
  • The menus, the Tree and Pick tooltips and the free camera's notice name the key you've set, and leave it out when there's none.
  • Typing in Export's Name, Author and Description fields, or in the Clips and Rigidbodies filters, doesn't set off any of these keys.

Walking the list

You can also walk the left pane's list (the tree, the search results and the Objects explorer) with the keys. This part is experimental. ↑ ↓ moves a row, Page up / Page down a pane and Home / End to the ends. → opens a folder or a node with children (and steps into an open one), and ← closes it, or goes up to the row it's in when there's nothing to close. Moving onto an object selects it, and the list only scrolls as far as it has to. On the Steam Deck, and with any gamepad, the d-pad works as those keys and the sticks scroll.

Safe by design

  • It's there with developer tools only. Like the rest of the window, the tab only exists while that switch is on.
  • Edits don't persist. Nothing is replayed at startup (unless you export), and the worst an edit can do is break the running session, which a restart fixes. From 1.5.0, the only things the Inspector keeps in its config file are your keys and how you left the tab (the view, the panes and the open Objects folders).
  • It uploads nothing. Reading and editing values never creates or uploads a texture, so Direct3D 12 isn't a concern here. Object names are drawn through the window's guard, so non-ASCII shows as ? on Direct3D 12, as in the Console.
  • If Unity destroys the object or component you have selected, the selection is cleared with a note instead of an error.
  • Errors stay on their row. Reflection failures, setter exceptions and failed shader queries are shown on the row they belong to.

Console and API

  • inspect lists the roots. inspect <name or path> [component] selects something and opens the tab on it (path segments are separated by /, and without a path you get the first match by name). inspect set <path> <component> <member> <value> sets one value, parsed the same way as on the row, and there's also inspect pick. Completion offers object names and, after a path, that object's component names.
  • bodies lists the scene's rigidbodies, fastest first, with their speed, mass, kind and sleep; bodies pause, bodies resume and bodies step [count] drive the physics pause (experimental).
  • objects lists the loaded objects by kind, objects <kind> [filter] lists one kind, objects usedby <kind> <name> shows where an object is used, and inspect object <kind> <name> selects one in the Objects view (experimental).
  • There are read operations (experimental) for the console's op and the Bridge: inspector.objects.find, inspector.objects.children, inspector.components.list, inspector.member.get (a component's members as the rows show them, private ones on request) and inspector.selection.get. The object explorer adds inspector.loaded.kinds, inspector.loaded.list and inspector.loaded.usedby.
  • Inspector.Inspect(UnityEngine.Object target) selects an object, component or material and opens the tab on it, so a mod's own tab can put an Inspect button next to anything it lists. The Assets tab's Inspect button on a texture uses it (it opens the texture itself in the Objects view, where Used by lists its materials and sprites).
  • There's nothing to declare. Every object and component is shown, a mod's own included. A field with Unity's [HideInInspector] attribute is hidden, so a mod that wants a field hidden just uses that.
  • What the Inspector needs from the Tool window is public: ToolWindow.AddOverlay (drawing over the game while the window is open), BlockGameInput and Drawable.

Clone this wiki locally