I need a list of game objects that are inside of a boxcollider and be able to access each one individually. there will be hundreds of said game objects so I can’t just get all of the objects with a certain tag and compare distance.
you can use:
Physics.OverlapBox
It will Find all colliders touching or inside of the given box.
so you can set the size of your box for your purpose (you mentioned distance)
HERE
Collider[] hitColliders = Physics.OverlapBox(gameObject.transform.position, transform.localScale / 2, Quaternion.identity, m_LayerMask);
and use for or foreach loop to do your function on them
it will return collider so for accessing game object you have to this:
Collider.gameObject