unity 檢測 任意半徑球體內的所有物體( 碰撞體)

NO IMAGE

m_cCollider = Physics.OverlapSphere(transform.position, m_fExploationDis);
         for (int i = 0; i < m_cCollider.Length; i)
         {
             if (m_cCollider.gameObject.tag
== “m_tEnemy”)
             {
                
             }
         }
 
m_fExploationDis 檢測半徑, m_tEnemy  檢測物體的標籤