- Home /
clone object make a new script
I have an object that I am cloning, when I clone it, they share the one script.
Can I clone an object but make it run a new script with but with the same internals?
For example, I have a box, I click and a new box spawns next to it, but they are losing integrity, when the integrity reaches 0 they despawn. When the original reaches 0, both the copy and the original dies, how can I stop this happening?
Are you spawning an object or a prefab? You should be able to spawn a prefab and they will have their own scripts.
Your answer
Follow this Question
Related Questions
How to have a cloned/duplicated enemy react the same way the original does? 1 Answer
MonoBehaviours with ScriptableObjects and duplicating` 1 Answer
Spawn Gameobject at Cloned Gameobjects gameobjects 1 Answer
strange cloning array beviour 1 Answer
Is there anything wrong with this script? It used to work but now it doesn't. 2 Answers