I just had a silly bug where I had missed to change the text after moving on to the next state
AdventureGame.cs
else if (Input.GetKeyDown(KeyCode.Alpha2))
{
state = nextStates[1];
textComponent.text = state.getStateStory();
But first I thought it was i mistake in the configuration I had made for a specific state, so I tried to add some logging that point to which state I would need to look in.
Wasn’t able to figure out how to do though. I would like to add a logrow on the file title.
State.cs
public string getStateStory()
{
Debug.Log(state.filetitle);
return storyText;
Any ideas on how to achieve this?