Hi guys.
So in my game I’m using a number of singleton scripts to manager various aspects of the game. I always include a static reference to the instance of the script for easy referencing. It’s working fine in all of my scripts bar my GameManager script. When I try to call it I get a null reference exception and I tried to print the reference to the script and it does indeed return null. I thought this might be because GameManager might be a reserved name or something so I changed it to just Manager but alas. So below is the structure I was using and I was wondering if anyone might be able to point out why I’m having an issue with this script in particular when the logic works fine in other places.
Thanks,
Alec.
public class Manager : MonoBehaviour
{
public static Manager Instance;
void Start ()
{
Instance = this;
}
}