Should there be only one Update in a game?

Just started the game and working on the Ball Update. I imagine that there will be other Update in other classes implemented and I have read that good practice is to only have one working Update in a game because otherwise it becomes difficult to manage or debug them.

Hi Marijan, welcome to the community :slight_smile:

Could you share a link to the resource to which you reference?

Any script which inherits from MonoBehavior in Unity will have it’s Update method called by the engine, the link below should illustrate this quite well.

Debugging within Unity and Visual Studio is not really any more challenging because of the number of Udpate methods. Using Visual Studio Tools for Unity you can add breakpoints as normal, Attach to Unity, and run your game. When a breakpoint is hit, the focus will shift to Visual Studio and you can step through the breakpoints or line by line if you prefer.

Hope this helps :slight_smile:


See also;

Privacy & Terms