Copy template object component to dummy objects
So i'm quite new to unity5 and c# and i have a conundrum and wanted to ask some of you more experienced members for a solution or even advice.
I have a template pool of about 16 different objects (lets call them boxes). When i run the game it should start populating the world with these boxes. The way i envisioned this is to create another pool of dummy game objects (dummy boxes) which when transferred from the dummy pool into the world would inherit a one of the 16 different template types. Reason behind this due to the fact that the boxes all have the same mesh, rigid body, collider , transform, but different tagName and sprite + animation, so i though this would be the easiest way, for all the dummies to have the same components while the templates to have the unique ones and when called upon they would inherit the template components, once i don't need the used boxes i would strip the template and revert to the dummy game object and put it back into the dummy pool.
Any idea how i could easily copy / remove the component from the template to the dummy? Is this even a good approach?
Your answer
Follow this Question
Related Questions
How to store all components of a GameObject in an array? 0 Answers
Copying gameObject doesn't work as intended 1 Answer
How to get parent with component on collision? 0 Answers
Duplicates of prefab appearing out of nowhere 0 Answers
Copy GameObject in C# 0 Answers