Hey there,
I’ve heard a lot of talk about how implementing your own custom Update function into a Unity project can help reduce a lot of overhead and thus make the game a lot more performant.
In theory, this makes sense to me, but there is one part I just don’t get, and I’d love to get your wise takes on the matter -
Assume you make your own Update system out of three scripts (just like described in this guide ).
You have an interface that determines the methods your custom update logic will have.
You have a subscription system which uses Unity’s Update in order to check for all of its subscribed objects and call the custom update method on them (by looking for the interface on those objects).
Now, because this object times its updates using Unity’s, it will need to inherit from MonoBehavior, and have an object in the scene. Alright, cool.
Finally, you have an updateable class that inherits from Monobehaviour and your interface in order to attach to GameObjects in the scene and call the custom update functions.
Now, all the objects that use this custom update, don’t they inherit from a script that also has Monobehaviour?
If so, then what is the point? Doesn’t that mean that now our objects still have MonoBehaviour, with all the overhead that comes with it?
I understand the other advantages of a custom update system - you can control the order in which certain objects update, which is a huge advantage. I just don’t get how this improves performance.
Sorry for the dumb question, and thanks in advance for your answers