Wiki

Clone wiki

uPrefabs / Questions and Answers

<< Back

1. Does this solve all my nested-prefab problems?

For the most part, yes. As long as you keep the prefab state un-broken, then it will just work.

2. I want to apply my instance component changes to all my other instances, how?

First apply the component instance changes by using the apply menu. Then select the prefab asset in the project pane and use the revert menu to revert that component only. This will revert the selected component on all the instances.

3. How do I revert all instances in my project?

Select the prefab asset in your project. Use the revert menu and select "Revert Object".

4. I prefab asset is missing or deleted, and now the prefabs are broken, how do I fix this?

uprefabs-broken.jpg

The uPrefab and uPrefabChild scripts contain tracking information that is saved on the instances. You can re-create the original assets by dragging each prefab back into the project pane.

Then, on your other instances, you can drag the asset prefab onto the uPrefab script reference to re-assign the asset. This will "reconnect" the prefab instance automatically.

uprefabs-uprefab-script.jpg

The final step is to confirm with the editor that you want to change the target asset. Then you can Revert Object on it, which will correct any missing or modified components.

5. What is the difference between a uPrefab and a uPrefabChild?

The uPrefab script points to an asset prefab that is the source. The uPrefabChild is an object that is not a prefab, but is a child of one. This allows you to revert or apply changes to that child throughout the project as well.

Updated