So in my base class, I have a variable that is :
public GameSystem GS; // reference to a GameSystem
// Use this for initialization
void Start () {
GS = (GameSystem)GameObject.Find("Manager").GetComponent("GameSystem");
}
Why is GS not available to be used in the sub classes? I get an error of :
NullReferenceException: Object reference not set to an instance of an object TargetControl.OnMouseDown () (at Assets/Scripts/TargetControl.cs:37) UnityEngine.SendMouseEvents:DoSendMouseEvents()ne.SendMouseEvents:DoSendMouseEvents()
But if I made functions inside of my base class, they are available to my sub-classes. Why is GS not?