Is it possible to make a gizmo drawn through a function with the [DrawGizmo]
Attribute (documented here) selectable in the same way a gizmo drawn through MonoBehaviour.OnDrawGizmos
is selectable?
I only ask because, while functionally identical, I really like having my Editor and Game code completely separate, and this is one of the things preventing me from doing that.
Make sure to include GizmoType.Pickable.
[DrawGizmo(GizmoType.InSelectionHierarchy |
GizmoType.NotInSelectionHierarchy |
GizmoType.Pickable)]
static void DrawWhateverGizmos(MapInstaller scr, GizmoType gizmoType)
This seems to make all the gizmos drawn pick the game object.