Created
May 27, 2017 17:59
-
-
Save unity3dcollege/9b7fcc06055f1608740a13614992eed6 to your computer and use it in GitHub Desktop.
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
private void OnDrawGizmos() | |
{ | |
#if UNITY_EDITOR | |
var wave = GetComponentInParent<Wave>(); | |
var name = string.Format("{0}\r\n{1}", wave != null ? wave.name : "NOWAVE", gameObject.name); | |
bool isSelectedWave = transform.IsInCurrentSelectedWave(); | |
Gizmos.color = isSelectedWave ? Color.green : Color.gray; | |
Gizmos.DrawSphere(transform.position, 0.5f); | |
if (isSelectedWave) | |
GizmosUtils.DrawText(GUI.skin, name, transform.position + Vector3.up, Color.green, 14, 5f); | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment