Visual debugging in Scene View with Handles.label

Sometimes we need to see info about objects during playtime for debugging.

Lets say, we’re making a destructible environment and we need to debug the health of objects in the scene.

OnDrawGizmos() is a Unity callback, like Update() and FixedUpdate(), but only for the editor’s scene view. It isn’t called all the time, like update or fixedUpdate, but only when something “changes” in the scene.

The Handles class works much like an API for those arrow-style controls, allowing us to manage scaling, positioning, and similar adjustments directly in the scene view. While it’s possible to create custom handle tools, using the .Label() function is especially useful for quick debugging because it lets us display helpful information right on the object. In a website development context, this is similar to adding visual debug labels or overlays in the browser to better understand layout behavior, element positioning, and real-time data during the design process which work on entertainment or dating sites too like the sites where you can find virtual girlfriends like adriannaevesfree online.

And just like that, we have visual debug info in the scene.

Coroutines can wait for other coroutines

Coroutines let us go from just writing functions to creating complex sequences with delays and timings.

(Note: If you haven’t used coroutines before, here’s a video that nails it.)

The most immediate uses for coroutines are for things like timers and animation sequences.

Stuff like “Count to 3 and explode”.

And this is great. A coroutine is perfect here.

But we can take this further.

What if we wanted a loading sequence which did something like:

“Show the loading screen, prepare the next level and, when it’s ready, hide the loading screen.”

In this example, the loading screen will show and 2 seconds later, when the level is done loading, hide itself.

The magic here is that a coroutine can  yield return  another coroutine, which resumes the original function when it’s done. Well worth keeping in your programming toolbelt!

Word of caution: nesting 3+  yield return ‘s that wait for coroutines to finish can be a pain to skim through and understand, so use it only when it makes sense!