- Home /
Question by
SirGive · Feb 28, 2015 at 06:54 PM ·
prefabprefab-instance
Update prefab instance with local values (Editor Script)
I am trying to update several prefabs via an editor script for local scene values. They are all good until I hit "Play". Do I need to somehow mark the prefab as dirty? The specific instance I am having issues with is updating the SortOrder on a SpriteRenderer. I really don't want to have to write a separate inspector class to handle this - I have one utility that does a range of modifications to the scene.
I also ran into the same issue with another prefab, and I ended up just breaking the prefab reference. My Utility script just grab references to all the components with the particular script, instantiate normal gameobjects from prefab, and delete original gameobjects.
Comment