I have this experimental Coin Magnet system that uses OverlapSphere to pick up nearby coin objects. CoinSpawner and CoinMagnet are essentially in the same position.
https://paste.mod.gg/epzrdlrwhbdm/0
Ideally, coins that are not within the magnet's range should not be registered to the _magnetizedCoins list. But in the first version, in CoinSpawner where I set new coin objects to be active before setting its new position, some coins seem to be Magnetized, even though they are out-of-range. They are also disabled and with Magnetized == false when the pool releases them. When I change the order, and set the coins active only after setting their new positions, it works normally.
There is no stop in the spawn instruction, so my only guess is that OverlapSphere somehow takes over in the middle of the action. Is it probable that the Physics queries can pick up the colliders right after they are set to be active?
A tool for sharing your source code with the world!