- Home /
Can prefabs drop attached scripts?
Scripts being "dropped" from a prefab while the game is running is becoming a problem.
This happens randomly when fighting an enemy, the defense menu will come up empty and when running in inspector, the prefab for the menu will show that there is a lost script.
Running from exe it throws an exception. I've had the game read the script 2-3 times then drop the script in some playthroughs, while others it hasn't happened at all.
It has had an impact on other prefabs but I noticed it's mostly limited to things being cloned. Hitboxes, menus, effects, hp flyoff. anything that is created in game.
Has anyone else had this happen and if so, how did they get around it.
Comment
Check your code for a Destroy(this) ins$$anonymous$$d of a Destroy(gameObject).