The Collider Radar detects all 3D Colliders included in the LayerMask.
- Script is ideally placed on a child object of the player.
- The player is required to have a Rigidbody for the physics events OnTriggerEnter/Exit.
- A Radar UI object, background and icon prefab must be set up for this to work. (not provided)
This example does not include pooling, and simply Creates/Destroys icons as colliders enter and exit the trigger.
using System.Collections.Generic;
using UnityEngine;