How does CharacterController visualize its collider?

I’m writing my own character controller that doesn’t use a rigidbody. Since my controller “creates” it’s own collider it doesn’t rely on the character object actually having a collider component. Still, for obvious reasons I want to visualize the collider, and I noticed that unity’s default CharacterController somehow does this. Even though there is no collider component added to the object the character controller itself visualizes the collider.

I read somewhere that the default CharacterController IS a collider, but as far as I know scripts that are added to objects need to derive from MonoBehaviour.

Any ideas on how to achieve this?

You will need to use Gizmos, There is no draw capsule function so you will need to use the other functions to make a cylinder

The documentation on Gizmos: Unity - Scripting API: Gizmos

Forum post talking about drawing a capsule with gizmos: https://forum.unity.com/threads/drawing-capsule-gizmo.354634/