Do hidden (inactive?) objects take up processing time.

I am currently playing around with a 3 dimensional array of objects as part of a Unity noob learning project.

I have a 3d array of objects, each of which is made up of 22 other objects. The number of tris per array object is relatively low.

I have a choice:-

A) build the array objects from a prefab (that includes the 22 child objects and then hide the child objects that are not required).

This is the simplest (I create a single prefab with all child objects present I can just instantiate that object for each cell of the array, hide child objects and then unhide them later when required).

B) build the array objects one at a time, adding child objects as required. During play add or remove child objects using the same method.

This leaves the number of objects and tris lowest at start but is far more complicated to do and also makes adding new child objects more complicated (although once the function to add/change an array child objects is written, it can be used for any changes.

The frame-rates for my tests so far with 1000 objects * 22 child objects are surprisingly high with all turned on (*gotta love Unity) but there isn’t a huge amount else going on in the scene yet.

Q. If I have 1000 objects (* 22 child objects) but 75% of the child objects are hidden will the hidden objects still be taking up processing time?

I’ve found the overriding concern, as you mention, is complexity. Weird spawn-on-demand tricks seem to always have these infrequent, hard-to-track-down special case glitches. Especially as you make changes and have to track down everywhere/time things get spawned.

Spawn-at-once allows you, early in design, to Pause, manually Activate everything and check your work.

IMHO, inactive game objects don’t take any precessing time. They go into a big inactive list which is never looked at during updates (unless you make something active.) That’s (my guess) why GameObject.Find won’t find inactives. They will take up memory space, but will quickly be moved to the lowest priority memory.