Quantcast
Channel: Answers for "Missing GameObject and Null do not test the same, but how do I test for missing?"
Viewing all articles
Browse latest Browse all 12

Answer by DriesVienne

$
0
0
I have no direct answer, but a workaround came to mind. You could have your occupants reference their occupying collider, and notify the collider when it gets destroyed, thus allowing it to be occupied later by other objects. Alternatively, depending on how fast objects are added and removed to the grid, and the size of your grid, you could have your occupants BroadcastMessage to your colliders to notify them of it's destruction. This could work, but it avoids the real question; getting "Missing" when you should be getting null. Someone smarter than me might be able to help with that.

Viewing all articles
Browse latest Browse all 12

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>