unity missingreferenceexception the object of type gameobject has ben destroyed but you are still trying to access it code example
Example: MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it.
// I fixed this by making the variable(s) static