Skip to content

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

License

Notifications You must be signed in to change notification settings

Genso-0/Mesh-Gizmos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages