Skip to content

Instantly share code, notes, and snippets.

@anchan828
Created October 2, 2013 07:34
Show Gist options
  • Save anchan828/7d106de8bc332527b7f2 to your computer and use it in GitHub Desktop.
Save anchan828/7d106de8bc332527b7f2 to your computer and use it in GitHub Desktop.
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