Saving Manual Changes to Prefab when refreshing

zee_ola05
Member
Registered: 2014-09-25
Posts: 12

Topic

Right now, when I change of the transform of the instance of my prefab and hit "Refresh (all)", the transform changes would be retained. However, when I change a property, say the size, of my Box Collider, then hit "Refresh", the manual changes to my Box Collider would be lost.

Would it be hard to save all the manual changes to the instance of the prefab when hitting refresh? I mean, you have already done this for the Transform component, why not apply it to all the other components?

Lea Hayes
Rotorz Limited
From: United Kingdom
Registered: 2014-03-04
Posts: 638

Response 1

You can use the "Apply Prefab" button by selecting the game object using the inspector. Of course this will apply that change to all instances of that prefab.

zee_ola05 wrote:

Would it be hard to save all the manual changes to the instance of the prefab when hitting refresh? I mean, you have already done this for the Transform component, why not apply it to all the other components?

The transform component is preserved by calculating the difference between the previous and new states of a tile.

It is a far more complex process to preserve manual tweaks on other components. For instance, which components should be reset as part of a full tile system refresh? How would the user specify which components should be preserved and for which specific tiles/brushes, etc.

With this feature I imagine the "Refresh" window having thousands of toggle buttons.

It is of course possible to create a custom "Refresh" editor script which maintains the specific data that you would like it to. Essentially you could take a copy of the important values, perform the 'Refresh' action, and then restore the important values again.