Search Issue Tracker
Fixed in 5.4.0
Votes
0
Found in
5.4.0b5
Issue ID
770153
Regression
No
[ExecuteInEditMode] Calling DestroyImmediate in OnEnable crashes Unity
Steps to reproduce:
1. Open attached project
2. In hierarchy, create empty game object and make sure that its Inspector is visible
3. Drag NewBehaviourScript on it and notice error that script can't be added and, when clicking OK, m_InstanceID != 0
4. Create new empty game object but this time make sure that its Inspector isn't visible (object isn't selected)
5. Drag NewBehaviourScript on it and observe a crash
Long story short: if object is selected and inspector is visible - errors, if object isn't selected - crash
Reproduced with: 5.2.4p1, 5.3.2p3, 5.4.0b6
Comments (2)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on UndoManager::RegisterUndoInternal when applying added GameObjects to a Prefab
- [Asset Bundles] A new bundle hash is not generated when the name of a serialized field is changed
- Icon section shows incomplete message and unusable check box in Build Profiles and Player Settings window instead of “Not applicable for this platform” for Dedicated Server Platform
- Assets are created in the Package folders when creating assets via custom buttons in the Inspector window or other windows
- “Select” windows are named differently on Windows and macOS
x4000
Jun 24, 2016 13:23
Note: the problems I were having are now fixed in unity 5.3.5p5. I was seeing m_InstanceID != 0 issues, which I was assuming were related to this, but it may actually have been the Threadpool issues that were fixed there. Either way, b21 and b22 did not have the issue, but 5.3.5p4 did.
x4000
Jun 22, 2016 12:51
Is this something that we could get int the next 5.3 branch patch? So far as I can tell, this is only in the 5.4 patch notes, and this is affecting a project I'm working on. Upgrading to 5.4 resolves this issue, but then of course there are new issues arising from the fact that 5.4 is beta.