Hi,
I have a GameManager
static class I use for keeping track of scores, lives and what not.
I’m trying to reference other classes in this static class, for example the SpawnManager
monobehaviour class.
I’m trying to do something like
public static class GameManager
{
public static int BlocksLeft { get; set; }
public static int LivesLeft { get; set; }
public static int CurrentLevel { get; set; }
public static int BlocksDestroyedThisRound { get; set; }
public static int BlocksDestroyedAllGame { get; set; }
public static SpawnManager spawnManager { get; set; }
}
But this throws an error as the GameManager obviously doesn’t know what a SpawnManager is.
My plan was to have the spawnManager instance set GameManager.spawnManager to be itself on startup. How can I import this class into the GameManager? Is this even possible if spawnManager is an instance?
Thanks in advance