I try to assign the gameobject to a variable, and check if the variable become null after the gameobject destroy.
It seems to work, but when i look at the inspector when running. The variable become “missing transform” very late after the gameobject destroyed. It seems to be 2 to 3 sec delayed.
Remember that Destroy() doesn’t immediately destroy a GameObject, rather marks it for deletion at the end of the frame. Could you post the code that you’re having trouble with?
The inspector only updates when it gets an update message. That happens kinda whenever Unity feels like it. I think one of the things that should be triggering it is a value changing, but it might be that a value getting destroyed does not count.
Try (literally) waving your mouse over the inspector as the object gets destroyed.