How do i save a prefab overide to to master/source prefab via scripting

Hi there,

Lets suppose i have a prefab, i drag it on scene, then i change few properties which are now overrides. Now i want to apply one particular override to master/source prefab so this change appear in all the instannces of that prefab.
We do it visually by right clicking on the blue line override property and selecting apply.

But how can i achieve that with script? I know i need to use PrefabUtility but i cant understand without a code example.

Thanks

Start here:

You can follow the link for SerializedProperty to see how those are created if you’re not familiar with them.