Pausing Gameplay

Hi all,

I was thinking about pausing the gameplay GameObjects to stop updating them when opening the Pause Menu (for instance) and the first thing that came to my mind was to store all the gameplay GameObjects in a list when instancing them, and then set the GameObject.active to false. Is this the best way to do this? Do you have any better idea?

EDIT 1: Of course another idea would be to add at the beginning of every Update function something like:

if (!m_GameplayManager.IsPaused()) {...}

Ths would be another solution but a bit annoying to add it in every new GameObject I create.

EDIT 2: Another solution for this would be to set the scale time factor to 0. I don’t know if this would work or what consequences will produce…

There’s about a billion topics on this subject, so reading them will no doubt give you some ideas. :slight_smile:

–Eric