Hope you're doing well. I've been trying to implement a pause menu using this tutorial https://www.pixelcrushers.com/phpbb/vie ... f=3&t=4345, however I've run into some issues with pausing dialogue and I'm not exactly sure where to implement my code.
Basically when I pause the game during a conversation, it skips the line of dialogue currently running and resumes on the next node when I hit resume. Or if I hit pause during a player response section, when I try to resume it just completely ends the conversation...which isn't ideal as I've set that as a trigger to load the next scene.
My current pause menu script is below.
Code: Select all
void Update()
{
if(Input.GetKeyDown(KeyCode.Escape))
{
if (GameIsPaused)
{
Resume();
} else
{
Pause();
}
}
}
public void Resume()
{
pauseMenuUI.SetActive(false);
Time.timeScale = 1f;
GameIsPaused = false;
}
public void Pause()
{
pauseMenuUI.SetActive(true);
Time.timeScale = 0f;
GameIsPaused = true;
}
Hope this is somewhat clear, I'm just not exactly sure what's making those specific issues happen at those points when I pause/resume right now, and I'm not savvy enough to get my head around the pause and unpause functions. Any light you could throw my way would be greatly appreciated!
Using 2019.4.19 and Dialogue System 2.2.15.