Skip to content

Instantly share code, notes, and snippets.

@anchan828
Created October 2, 2013 07:34
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
using UnityEngine;
public class Question5_practical : MonoBehaviour {
}
using UnityEditor;
using UnityEngine;
public class Question5Editor_practical
{
[DrawGizmo(GizmoType.NotSelected | GizmoType.Selected)]
static void OnDrawGizmos(Question5_practical target, GizmoType type)
{
Collider[] overlapSphere = Physics.OverlapSphere(target.transform.position, 0.1f);
if (overlapSphere.Length != 0)
{
Gizmos.color = Color.red;
}
Gizmos.DrawWireSphere(target.transform.position, 0.1f);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment