gameobject optimization question

Suppose I have a gameobject that has no Update() or LateUpdate() methods on it’s script, the script simply has some stuff in Awake() or Start(). This is for convenience, for me, really.

This active gameobject w/ enabled script component, will it add any overhead at runtime? Or should I mark it as inactive + disabled script to cut down on overhead and cpu cycles. Just not clear on how the the engine dispatches messages to gameobjects at runtime.

I’m not sure what kind of overhead there would be. I would imagine that you would not see much in the way of performance/resources improvement unless you had many hundreds/thousands of these items. Maybe just write up a quick benchmark script to instantiate many thousands of these items, then test performance/memory with them enabled/disabled.

A GameObject with none of the regular update or event functions has no appreciable CPU overhead, so there should be no problem using it as a store of data.

On this topic - I’ve been using a separate non-Monobehavior derived singleton to do a lot of the bookkeeping. I have a Monobehavior component that makes sure the singleton is created in it’s Start(). Is there any benefit to combining the two by making the singleton class inherit from Monobehavior and exist as a component somewhere in the scene?

I realize it’s not good behavior to override Monobehavior’s constructor so that is why I split the two up.