Skip to content

This is an example for how you can write visual debugging tools for Unity instead of using Debug.Log or breakpoints for your scripts.

Notifications You must be signed in to change notification settings

zeroregard/unity-debugging-visualization-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

unity-debugging-visualization-example

This is an example for how you can write visual debugging tools for Unity instead of using Debug.Log or breakpoints for your scripts.

Example

In this example, there is a hypothetical AI agent with a very simple FSM in which it chooses which task to do next. Every task has private members with interesting data, however, these tasks are not MonoBehaviours. You could just make the classes serializable, but viewing these in Unity's inspector can be quite confusing, and you need to enable Debug mode or make your fields publicly accessable somehow.

Instead, you can implement the SerializeSubobjects interface and give the classes you want to serialize. In the example, the editor marks the "current" state in green.

alt text

About

This is an example for how you can write visual debugging tools for Unity instead of using Debug.Log or breakpoints for your scripts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages