Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.8 KB

README.md

File metadata and controls

41 lines (31 loc) · 1.8 KB

Mesh-Gizmos for Unity

A collection of functions that imitate Unity's gizmo functionality using transforms and meshes. alt text

Built With

Unity 2020.1.4f1 Universal Render Pipeline

Language

C#

Getting Started

  1. Add Mesh Gizmos Container prefab to your scene.
  2. From your script, find MeshGizmos instance with MeshGizmos.Instance. (eg. var _Gizmos = MeshGizmos.Instance;)
  3. Use instance to call each gizmo as you would with regurlar gizmo calls. (eg. _Gizmos.DrawLine(Vector3.zero, Vector3.one, Color.yellow);) Does not need to be in OnDrawGizmos().
  4. If you would like to use your own material then you can add it to the Material reference in Mesh Gizmos Container prefab.

For use with HDRP some extra steps are needed.

  1. Find gizmo material
  2. Select shader tab ->HDRP -> Lit

Picture guide for HDRP

Usage

See ExampleGizmoCalls.cs for usage examples.

Example solar system scene with bodies showing the gravitational force (red) excerted on them and their velocities (blue). alt-text

License

Distributed under the MIT License. See LICENSE for more information.

Contact

@genso_0

Project Link: Mesh-Gizmos