Hey guys, I am creating objects and attaching components to them, do you think it would be best to spawn a empty game object and attach children to the object and add components on them(Children)? Or should I just attach components to the objects themselves? Like this: Empty OBJ child AudioSource child Light Empty OBJ 2 child Sphere Mesh Render child Sphere collider Would this act on any performance if I was removing and adding components? Or would the new game objects give me more overhead because of the spawning of new game objects?
Instantiating new GameObjects and Components will definitely have more overhead than if you just instantiated Components. EDIT: But if you really needed the children you could just instantiate 1 prefab with all the components and gameobjects. In fact that might be better than doing it all separately.
I was thinking more for having the sounds pre loaded on the children and play them as I need them, would you think that may be a little better?
If you're dealing with AudioSources, it's better to change the clip out and Play() then instantiate a new one, yes.