https://github.com/zeroregard/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.
https://github.com/zeroregard/unity-debugging-visualization-example
debugging unity unity3d
Last synced: 5 months ago
JSON representation
This is an example for how you can write visual debugging tools for Unity instead of using Debug.Log or breakpoints for your scripts.
- Host: GitHub
- URL: https://github.com/zeroregard/unity-debugging-visualization-example
- Owner: zeroregard
- Created: 2018-03-23T13:46:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-23T14:07:17.000Z (over 8 years ago)
- Last Synced: 2025-04-25T06:45:21.217Z (about 1 year ago)
- Topics: debugging, unity, unity3d
- Language: C#
- Size: 58.6 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://en.wikipedia.org/wiki/Finite-state_machine) 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.
