Closed KamilTheDev closed 1 month ago
Calling EditorUtility.SetDirty(gameObject);
seems to be the correct way to mark prefab as modified.
Calling
EditorUtility.SetDirty(gameObject);
seems to be the correct way to mark prefab as modified.
Yes, but it's more recommended to use Undo.RecordObject(gameObject, name)
before you make a change so you can undo it.
If I have this code:
Clicking the button assigns fields correctly, but they're never actually saved to the prefab. If you exit and go back into the prefab, the fields are empty.
Edit: If I make some change manually, then it will save properly. Is there some function I can call to force Unity to save the prefab?