I am trying to make a sort of adventure rpg game and am curently working on the inventory. There is only one thing that i can’t seem to figure out and i can’t seem to find any helpfull info on it.
Curently whenever I open the inventory bij pressing I it opens and I can click everything, BUT the game keeps playing in the background. So the camera follows the mouse and if i click doesn’t matter where the character attacks. I don’t want that to happen and whas hoping someone here can explain to me how i can change that with a script.
I would consider two options. One, you disable any scripts that you need to disable and enable them when not paused, but this can get messy depending on your project.
Other option is you set a static variable “isPaused” and any action that needs to can check this variable before running any code.
The use of timeScale can work, but be aware that timescale doesn’t effect everything. It may not work for you to stop what you need it to stop.