Destroy failed, can’t remove recttransform because image (script) depends on it

Look up the data to indicate destroy (object, time); the first parameter in it should be of the object type, and then change destroy( Cube.gameObject ); success

Read More: