I been stuck on this part for a while. When I have to run the project to see if it works, after I set a return to game object Unity keeps giving me this error: NullReferenceException: Object reference not set to an instance of an object
AdventureGame.Start () (at Assets/AdventureGame.cs:17)
/
[SerializeField] Text textComponent;
[SerializeField] State startingState;
State state;
// Use this for initialization
void Start () {
state = startingState;
textComponent.text = state.GetStateStory();
}
/
[TextArea (10,14)] [SerializeField] string storyText;
public string GetStateStory()
{
return storyText;
}
I been trying all I could, even rewriting specific parts to see if maybe there was a misstype I dint notice, but to no avail.