I’m having a weird issue where a property on a component, in a prefab, is not being fully saved when I exit the prefab.Below I’m showing what I typed with the prefab open…
…and below I show what results when I leave the prefab and go back to where it’s used (Left arrow in Hierarchy).
This appears to be happening for any “public string” field now, as I’ve tried adding new dummy components to test it. It’s also happening for string fields that previously worked.
It always takes a bit of the text, clipping it.
I’ve tried adding an OnValidate method to emit the value, and it correctly shows the value that I’ve edited. I’ve also tried adding an explicit [SerializeField], but it doesn’t change the result.
I have no idea what could be causing this. I restarted the editor but it did not help.
Example of component that fails:
public class DummyInformation : MonoBehaviour {
public string text;
}
I upgraded and the problem persists, in a clean new project. I’m not sure what I should do now, since basically it means I can’t modify text in the editor at all.
The problem seems to happen with any field type, not just text. It also applies if I open the prefab directly and edit it. The final changes are not saved. For example, if I edit three fields, the first two will have their full values saved, and the final one will be truncated.
I’ve tried disabling auto-save and it appears to work correctly. If I try to exit, and choose to Save, or if I manually click the “Save” button, it saves all of the values. Turning back on auto-save causes the same truncation to happen. I guess I live without auto-save.