Answer by DriesVienne
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...
View ArticleAnswer by Noztradamuz
Ok, maybe some code will help us, to help you, as far as i get with this i think the problem is that you're trying to acces a GameObject that's already been deleted (mean Null or Object reference not...
View ArticleAnswer by electricear
It actually doesn't need code. When I started troubleshooting the problem I set up a null test in the collider objects Update where it first Debug.Log(ged)the Occupancy, then tested for null and simply...
View ArticleAnswer by IllogicalGames
instead of using colliders, use compare range between the objects. its much more lighter than colliders since its not using physics. if you want to optimize it further, use on FixedUpdate.
View ArticleAnswer by huulong
As DriesVienne wrote, using an Observer pattern, messaging system or the like if probably your best bet to cleanly set your references to null before objects are actually destroyed. Unity is using a...
View Article