r/unity_tutorials • • Oct 04 '22

Video Usually we're all focused on developing features and fixing bugs, but creating some editor tools and custom inspectors can save you a lot of time and improve your workflow! Learn how to visualize data in the Scene View and the Inspector to improve your Editor experience and speed up debugging!

104 Upvotes

7 comments sorted by

7

u/LlamAcademyOfficial Oct 04 '22

Full Tutorial on YouTube

Hey all! Happy #TutorialTuesday!

Learn how to extend an existing Inspector in the Unity Editor and draw debug information in the Scene View!

In this unity tutorial you will learn how you can start visualizing hard-to-debug information in the Scene View and the Inspector to help you understand exactly what's happening in your script and track down problems fast!

We'll do some simple editor scripting to:

  • Show some new controls on the Inspector that toggle on/off the Scene View visualization.

  • Show the path and current velocity of a NavMeshAgent in the Scene View

  • Show the health of an Enemy in the Scene View

  • Show the line of sight raycasts in the Scene View and mark which object is obstructing line of sight.

  • Show line of sight information in the Inspector

  • Allow clicking in the inspector on an object to ping it in the hierarchy and focus it in the scene view. Optionally with 1 line of code removed you can also select it)

I know it sounds like a lot, but it's actually pretty easy!

As always, the full project for this video is available on GitHub!

2

u/FyreflyStudios Oct 05 '22

th and current velocity of a NavMeshAgent in the Scene View

Show the health of an Enemy in the Scene View

Show the line of sight raycasts in the Scene View and mark which object is obstructing line of sight.

Show line of sight information in the Inspector

Looks good!

→ More replies (1)

3

u/RST_Video Oct 04 '22

Love your stuff, thanks!

2

u/random_boss Oct 05 '22

Your content ideas are the best, love it

1

u/LlamAcademyOfficial Oct 05 '22

I appreciate that, thank you 🙏