How to keep some variables loaded when you change scenes or restart scenes ? You can of course save it local on disk, but there’s more simple solution if it’s just some variables that don’t need to be kept forever (as player current health, that you need to keep when starting a new level) You […]
Variables
Share needed variables by all gameObjects with a manager class

estimated time : 7 mn ingredients needed : Unity , 1 GameObject containing the gameController script, 1 or more GameObjects that need to access values. You want to have some variables that can be accessible between some gameObjects quickly? Let’s say we want the speed bonus contained in one object collected by a player to affect the […]