I am trying to call a function assigned to a canvas object but I can't figure out what method I should use:
ScoringSystem send;
send.AddPoints();
This method does not work and I get the following error:
NullReferenceException: Object reference not set to an instance of an object
ObHost.Update () (at Assets/Scripts/ObHost.cs:39)
The name of the script I am calling the function from is ObHost
.
The function is in a script called ScoringSystem
.
The function is called AddPoints()
.
I really don't know what to do here because I have tried other methods but they involve a game object, whereas my function is in a canvas.