-
-
Save anchan828/7d106de8bc332527b7f2 to your computer and use it in GitHub Desktop.
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 UnityEngine; | |
public class Question5_practical : MonoBehaviour { | |
} |
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 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