Search Issue Tracker

By Design

Votes

0

Found in

5.4.0f3

Issue ID

822619

Regression

No

Changed Prefab via editor script doesn't keep its changes after saving the scene

Scene/Game View

-

How to reproduce:
1.Open the attached project
2. Create a new scene
3. Open Window > Bug Editor
4. Click the Add Prefab Button in the custom editor window and notice how a prefab is instantiated via the PrefabUtility
5. Select the instantiated prefab, expand the list and click the "Create Objects" button in the Bug Editor Window
6. Save the scene (call it whatever you want)
7. Close the Bug Editor Window (important!)
8. Load the scene you just saved and look at the list on the Prefab. - It's been reset to the prefab!

Note: if one doesn't close Bug Editor window and reopens the scene, prefab keeps saved values. If one calls EditorUtility.SetDirty at the end of the script, it also keeps expected values, however, in documentation it is written that EditorUtility.SetDirty is only suitable for non-scene objects

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.