- Home /
Question by
cronological · Jul 24, 2018 at 08:39 PM ·
prefab2d gameprefabs2d-gameplayprefab-instance
Instantiated Prefabs Are Destroyed After 4 instantiations
So whenenver this code runs: It instances a prefab, but once 4 or so of the instances are in the scene the 5th instance will destroy itself and the other 4.
capture.png
(32.1 kB)
Comment
Do you have code anywhere that destroys platforms, or changes scenes? There is nothing there that would destroy anything.
Good day.
There is something interacting with that instantiated objects then... They ahve any script attached? or some other script interacting.... as bobisgod234 said, in this code there is nothing that could destroy it...
Answer by FatsWaller · Jul 25, 2018 at 08:11 AM
Are you using a destroy() function in any other script?