This fires for every part destruction / joint break event. There are a lot of those in a single frame when crashing a large ship into the ground. Can fix this 2 ways (likely both):
- Instead of taking immediate action, set a flag and then handle it in LateUpdate so that it happens once per frame instead of once per part
- Be smarter about checking whether anything actually needs to be updated
This fires for every part destruction / joint break event. There are a lot of those in a single frame when crashing a large ship into the ground. Can fix this 2 ways (likely both):