Question by
GameDBharat · Aug 22, 2019 at 04:24 PM ·
gameobjectcomponentremove
How to remove added component from prefab after game is stopped ?
I have used prefab as Gameobject.i have added script as component. it works fine in game but problem is when game play is stopped the added component should be not present in the prefab. after game play is stopped the script remains.
Comment
Answer by I_Am_Err00r · Aug 22, 2019 at 04:34 PM
You can have as many prefabs as you want, you can make a prefab with the component and another duplication of that where there isn't a component. There is also a function in all components called enabled which will disable a component (if you want to say remove, it is essentially removing it) which could also work.