Search Issue Tracker

By Design



Found in


Issue ID




Unity Test tools is attempting to destroy a transform component

Unity Test Runner


How to reproduce:
1. Download attached project file and open PropTest Scene
2. Open the Test Runner and run the tests

Actual result: After running tests, the EditorSceneManager::RestoreSceneBackups function is attempting to destroy Transform objects instead of the actual GameObject. Console will spam error messages like this one:

Can't destroy Transform component of 'Quad'. If you want to destroy the game object, please call 'Destroy' on the game object instead. Destroying the transform component is not allowed.
0x00000001414DF379 (Unity) StackWalker::GetCurrentCallstack
0x00000001414E5986 (Unity) StackWalker::ShowCallstack
0x000000014138C62B (Unity) GetStacktrace
0x0000000140887A7C (Unity) DebugStringToFile
0x00000001408D2FAB (Unity) DestroyObjectHighLevel
0x000000014096B74D (Unity) DestroyWorldObjects
0x0000000140E457D0 (Unity) EditorSceneManager::RestoreSceneBackups
0x0000000140E45F5F (Unity) EditorSceneManager::RestoreSceneManagerSetup
0x0000000140E46097 (Unity) EditorSceneManager::RestoreSceneManagerSetupIfValid
0x000000014151D96A (Unity) EditorSceneManager_CUSTOM_RestoreSceneManagerSetup

Reproduced with: 2017.3.2f1, 2018.1.0b12, 2018.2.0a5


Errors were caused by objects with HideFlags.DontSave not being properly cleaned up, as explained in our documentation:

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.