Home

Awesome

XRGizmos

Image

This is an expansion on a technique that Unity demonstrated in their SuperScience library:

https://github.com/Unity-Technologies/SuperScience/tree/main/Runtime/GizmoModule

XRGizmos offers a set of methods to draw primitives similar to Unity's Gizmos class:

It also offers several new methods for other useful shapes:

Advanced

Troubleshooting

To enable XRGizmos you need to add an "XR_GIZMOS" define in your Player Settings. This is so you can easily disable the debug drawing in release builds.

If XRGizmos are drawing in the editor, but they are not showing up in builds the instancing variants of the gizmos shader may be getting stripped from the build.

To workaround this you can add the gizmos shader to the "Always Included Shaders" array in Graphics Settings and change "Instancing Variants" from "Strip Unused" to "Keep All."

Image

The font used to draw text is a modified version of coolbutuseless' "arcadefont": https://github.com/coolbutuseless/arcadefont

If you need more features or better performance than this tool, I recommend the ALINE tool available in the Unity Asset Store.