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.
1 Answer
1Make 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.
Now I need one that rotates on its X Axis, but I'm not sure on how to that. Could you perhaps help me again?
– verschurengiovanni