Gizmos from Script Editor

Is it possible to display gizmos from a Editor

script instead of a MonoBehaviour


I love the look of this pen:

Handles.color =;
Handles.FreeMoveHandle(handle, Quaternion.identity, 0.001f,, Handles.DotCap);


The problem is that it can be selected and I don't want it to be selected. So is there a way to do something like this? I also don't want to use Gizmos, because they work in MonoBehaviour

and not Editor



source to share

1 answer

The pens cannot be inaccessible and the Gizmo must always be pulled from the Monobehavior. But there is a DrawGizmo function .

It is not actually inherited by the editor or MonoBehaviour, so you can use it for your script.

Enum also has a way to deactivate the match mode.

Hope this helps you!



All Articles