Skip to content

Instantly share code, notes, and snippets.

@EdSkamor
Created September 15, 2017 08:11
Show Gist options
  • Save EdSkamor/f15b4a4922e5aa3cab3529eed8eecf4c to your computer and use it in GitHub Desktop.
Save EdSkamor/f15b4a4922e5aa3cab3529eed8eecf4c to your computer and use it in GitHub Desktop.
GizmosGizmos
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityStandardAssets.CrossPlatformInput;
public class GizmosScript : MonoBehaviour {
public string m_MyIcon = string.Empty;
[Range(0f, 10f)]
public float Range = 2f;
void OnDrawGizmos () {
Gizmos.DrawIcon(transform.position, m_MyIcon, true);
Gizmos.color = Color.green;
Gizmos.DrawWireSphere(transform.position, Range);
Gizmos.color = Color.blue;
Gizmos.DrawLine(transform.position, transform.position + transform.forward * Range);
}
void Update () {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment