Created
September 15, 2017 08:11
-
-
Save EdSkamor/f15b4a4922e5aa3cab3529eed8eecf4c to your computer and use it in GitHub Desktop.
GizmosGizmos
This file contains 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
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