Hey guys… I have 10 same objects in scene. I have a script that is attached to all those objects and some of the code of that script is as follows:
Destroy (gameObject);
Object.Instantiate (gameObject, position, Quaternion.identity);
after destroying those 10 gameobjects, I instantite those objects at same time as shown in code. but, the problem is that when I instantiate those gameobjects, they have disabled components of destroyed gameobjects like script, audio source etc. I got a solution that shows that if i first instantiate object and then destroy the original ones, then this problem is solved. But its not suitable solution for me because if i first instantiate and then destroy originals, then the new instantiated objects wont stay on floor, they fall, as I have tried it. So I want a solution of it that gives ENABLED COMPONENTS of new instantiated gameobjects. pls help if any one have a solution.