Gizmos from Script Editor
Is it possible to display gizmos from a Editor
script instead of a MonoBehaviour
script?
I love the look of this pen:
Handles.color = Color.red; Handles.FreeMoveHandle(handle, Quaternion.identity, 0.001f, Vector3.zero, 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
The pens cannot be inaccessible and the Gizmo must always be pulled from the Monobehavior. But there is a DrawGizmo function .
https://docs.unity3d.com/351/Documentation/ScriptReference/DrawGizmo.DrawGizmo.html
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.
https://docs.unity3d.com/351/Documentation/ScriptReference/GizmoType.html
Hope this helps you!
source to share