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 changed the color of their associated cubes. The variable is public so I could monitor it in the inspector as well. The debug console reported both types as Null, but the inspector listed the null as none where as the destroyed object was just missing. Because the Log came before the color change test, and reported both as null but only the none version worked as I expected. I started trying to track down ways to turn missing to null with out needing the actual missing object to do it.
↧