public void ChangeMat(float M)
{
Current.Clear(); // This One Doesn't Clear
if (Spawner == Cactus)
Spawner = Tree;
foreach (GameObject C in Cacti)
Destroy(C);
Cacti.Clear(); // This one Clears.
Current.Clear(); /// won't clear here either.
// So Since "Cacti" Clears to count 0 after destroying the objects;
Current = Cacti; // Still doesn't clear.
}
objects that are colliding with player sphere are added to Current list; when this above method is called; All objects on the map(cacti) are destroyed, and all current objects known in player sphere turn into missing game object, and It wont clear it as It cant seem to clear a missing game object list that is being supplied by OnTriggerStay(); even when no collisions are providing it with data… So. IDK>
I disable the collider feeding OnTriggerStay; so that our list “Current” is not being supplied with entries; and then try to clear it to count 0. The answer is no.
It either wants the code posted; so it’ll magically work again, or. Its broken!? Disabling player colliders before method is called, or during the method; won’t work either.