Spring Debugger
Last updated
Last updated
To enable the Spring Debugger, once the Asset Window is open, simply set "Enable Spring Debugger" to true:
When the Debugger is enabled, springs will be registered and unregistered from the debugger automatically, allowing you to visualize, inspect, and interact with all the springs in the scene from this window. The Debugger has a tiny performance overhead, which is why you can choose to have it enabled or disabled. However, in all cases, it only runs in the Unity Editor. Even if the Debugger is enabled, it will never run or cause any overhead during a final build.
When the game is running and the Debugger is enabled, you’ll see something like this:
In these headers, you can see the name of the object, the Spring Component Type, the State button to toggle the object on and off, and the Ping button to highlight the GameObject in the Hierarchy.
When expanding any item with the left button with the down arrow you’ll see the springs registered in the SpringComponent:
In this case, we can see all the position, scale, and rotation springs of the TransformSpringComponent. If we open any of these with the down arrow, we'll see the same UI that the TransformSpringComponent shows. We can use this to monitor the active springs in the scene and, most importantly, to change their values or quickly iterate on Nudge values. Instead of creating a script and changing the values from there, we can open a spring in the Debugger and try different Nudge values, which we can then bring over to any script.
Finally, if you press Alt when pressing any arrow button, you'll affect the whole hierarchy, and all other elements will perform the alternate command of the button you pressed. So if you do Alt+Click to open a spring, all other springs in the list will close.
The Spring Debugger is a powerful tool for visualizing, inspecting, and interacting with the springs in your scene, allowing you to fine-tune and iterate on your spring animations efficiently.