One can access the Gizmos API in an editor script with something like the following:
[DrawGizmo(GizmoType.Selected)]
private static void DrawGizmo(ExampleMonoBehaviour myScript, GizmoType gizmoType)
{
Gizmos.DrawMesh( ... );
}
Is there any way to do this with the Handles API, or some other way? I am hoping to be able to draw the meshes of primitive shapes that are built into the Unity editor (cube, capsule, cylinder, etc.) without using static functions that have the DrawGizmos attribute.