Quantcast
Channel: Questions in topic: "clone"
Viewing all articles
Browse latest Browse all 508

i attach the prefab, but when i hit play, its not the prefab anymore

$
0
0
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? ![prefab attached to the buttons][1] ![it's not a prefab anymore][2] [1]: /storage/temp/172346-prpbl.png [2]: /storage/temp/172347-prpbl2.png

Viewing all articles
Browse latest Browse all 508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>