Create a gist now

Instantly share code, notes, and snippets.

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