Hi guys. Here’s my issue:
I’m trying to change the color of prefab item, but i can’t do it. I really do not understand why my changes are not saved.
The first screenshot:
i moved my prefab to hierarchy
the second screenshot:
i changed the color of prefab item
and moved the prefab back
the third screenshot
the color was not changed
In screenshot 2, you do not need to drag the prefab from the hierarchy back to the project location. Just hit the “apply”, delete the prefab in the hierarchy, and drag it from bottom to the scene again and see if it saved. Let me know.
I tried to do as you had said, but it didn’t still work.
I’m sorry i didn’t tell you at once, but the problem is that, if i change another item for example outline’s color, this change will be saved.
Once for a long time ago I faced the same problem, and then i somehow resolved it, but i don’t remember how.
Late reply, but for anyone looking for a solution, after doing your changes in inspector, hit “ctrl + shift + n” which will create an empty gameobject in the prefab hierarchy, then delete the empty object and it will save changes. Don’t ask me why it works, I have no clue.
Hi, please help. For some reasons all UI objects preffabs are not working properly. Changes I made in the preffab mode are not saved. Autosave is enabled. No problem with non-UIobjects. I have even deactivated antivirus. I have reinstalled unity many times. Nothing helps. What should I d0?
Hey, please help. For some reason when I add a UI element to my player object and try to save the changes the changes are not getting saved can anyone help please.
This issue is also happening for me. Whenever a prefab is opened and a property changed (for example: material, color, serialized variable etc.) nothing is written to disk. Literally not a single thing is being changed on the prefab (i can verify this, since git diff is the exact same).
Solution:
Following @madskillzHD instructions on creating a new child object works! It for some reason actually writes the changes to disk including the other changes made.
One shouldn’t need to add an empty each time they should save a value Info:
The prefab is a completely unpacked prefab variant.
Have encountered issue on Unity version 2022.2.1f1, 2022.2.15f1
Unity - Manual: Editing a Prefab in Prefab Mode this helps. You have to make sure that you don’t edit it in the mode that everything else is white and only the object is colored, in isolation mode. Then you are actually editing the prefab itself.
Note that values not saving in prefab can also be caused by the visibility of the property. If the property is private and not serialized, unity will not consider it when saving changes. The value either needs to be public or serialized. Some custom editor solutions may involve hiding and showing properties in inspector (Odin), so worth mentioning.