- Home /
i attach the prefab, but when i hit play, its not the prefab anymore
hello!
an island has 4 borders. borders keep the player inside the island.
there are also 4 buttons near our island. those buttons instantiate other islands.
when i instantiate some islands, the borders near those islands collide, and when they collide, they are destroyed. thus, the player can move through the other islands.
but when i instantiate, it doesnt instantiate the prefab one, it instantiates itself. and because we made changes on our island (we destroyed a border), the new island also has those changes.
so when i press the button to instantiate a new island, it doesnt instantiate the one in the Assets folder, it instantiates the one in the hierarchy.
so then we have missing borders.
i make sure that ive attached the prefab one and hit play after i saved the prefab. but after i hit play, when i look at the prefab again, what i see is not a prefab, its the island itself, so then it will instantiate a clone.
how can i prevent the button to change the prefab as itself?