1. Set the Dialogue Manager's Other Settings > Dialogue Time to Realtime. (Alternatively, if you need it to be Gameplay, set Time.timeScale=0 when you open your pause menu or inventory.)
2. When opening your pause menu, use code similar to this:
Code: Select all
PixelCrushers.UIPanel.monitorSelection = false; // Don't allow dialogue UI to steal back input focus.
PixelCrushers.UIButtonKeyTrigger.monitorInput = false; // Disable hotkeys.
PixelCrushers.DialogueSystem.DialogueManager.Pause(); // Stop DS timers (e.g., sequencer commands).
playerSelector.enabled = false; // Example: Disable player's Selector component.
Code: Select all
PixelCrushers.UIPanel.monitorSelection = true; // Allow dialogue UI to steal back input focus again.
PixelCrushers.UIButtonKeyTrigger.monitorInput = true; // Re-enable hotkeys.
PixelCrushers.DialogueSystem.DialogueManager.Unpause(); // Resume DS timers (e.g., sequencer commands).
playerSelector.enabled = true; // Example: Re-enable player's Selector component.
Code: Select all
public void OpenPauseMenu()
{
//... (your code here to open pause menu) ...
EventSystem.current.SetSelectedGameObject(firstPauseMenuButton);
}
- Can play open & close animations.
- Can ensure that some selectable (e.g., UI Button) in the panel is focused so the player can always navigate using joystick or keyboard.