Funny  Talented Kids
Funny Talented Kids

Reputation: 21

Prefab Connection Lost

I am developing a 2D game which includes different levels. At first I created the prefabs of the objects (enemies and other stuff), which I needed the most and I designed all of my levels by simply using the instances of those prefabs.

But at some point I lost the connection of all those instances of prefabs with the main prefab in the 'PREFAB' folder and now all of those instances are acting as normal gameobjects. Is there any way to make this connection relive? Because now I need to add some extra functionality into my game but as there is no connection of the gameobjects with the prefab, I just can't update the game by just updating the prefab.

Upvotes: 2

Views: 1989

Answers (1)

derHugo
derHugo

Reputation: 90813

First you can go to a Prefab and try to click Apply in the Inspector.

enter image description here

If it is not there at all than it really lost the connection.

In this case you can simply drag the same Object from your Scene onto the prefab in your Project View => The result should be that Unity replaces the existing "old" prefab with the current version you dropped on it and links them again.

However unfortunately this will not update all other objects in your Scene that also where once connected to that prefab so if you don't have any previous version of your project (e.g. using Git as suggested) I'm sorry you'll have to rebuild them using the prefab again.


The cause for that can be multible ones but maybe it is related to this question and there are just some scripts missing you removed / renamed lately.

Upvotes: 1

Related Questions