Last active
July 11, 2016 22:34
-
-
Save jawinn/8dae54198c83dd40baa6fa74c608e820 to your computer and use it in GitHub Desktop.
Draw Custom Editor Gizmo - Simple
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void OnDrawGizmos (){ | |
// In Editor | |
if (!Application.isPlaying){ | |
// Draw custom gizmo | |
Gizmos.DrawIcon(transform.position, "spawn_gizmo.png", true); | |
// Draw yellow box at size of character, for easier placement in level | |
Gizmos.color = Color.yellow; | |
Gizmos.DrawWireCube(transform.position, new Vector3(0.8f, 2.0f, 0.8f)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment