Skip to content

Instantly share code, notes, and snippets.

@jawinn
Last active July 11, 2016 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jawinn/8dae54198c83dd40baa6fa74c608e820 to your computer and use it in GitHub Desktop.
Save jawinn/8dae54198c83dd40baa6fa74c608e820 to your computer and use it in GitHub Desktop.
Draw Custom Editor Gizmo - Simple
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