Hi,
I have registered a sequence shortcut like below.
Then, I use it like below which works for the most case of mine.
For this specific dialogue that is not working, I am calling Continue() via Timeline to get to this specific dialogue node.
Then I get below warning and it does now work.
DialogueSystemController who has SequenceShortcuts component is persistent throughout the game as part of singleton (so its own DontDestroyOnLoad is ticked off but it is singletone in a way)
Sequencer Parser question
Sequencer Parser question
Last edited by fkkcloud on Sat Dec 19, 2020 11:46 pm, edited 1 time in total.
Re: Sequencer Parser bug
Hi,
Are you sure the Dialogue Manager with those SequencerShortcuts is the active one in the scene?
Are you starting play mode from another scene and coming into that scene through a scene change?
If you're arriving from another scene that replaces the Dialogue Manager, it's possible the SequencerShortcuts on the Dialogue Manager in the new scene is running its OnDisable() method before the Dialogue Manager is destroyed. The OnDisable() method will unregister the sequencer shortcuts. If you think this is what's happening:
1. As a test, temporarily remove the SequencerShortcuts from the Dialogue Manager. Add it to a GameObject in the scene with the Timeline conversation. If this works, then the problem is probably what I described above.
2. Put the SequencerShortcuts back on the Dialogue Manager. When arriving from another scene, make sure to destroy the new Dialogue Manager in Awake(), so it won't run its OnEnable()/OnDisable() methods.
Are you sure the Dialogue Manager with those SequencerShortcuts is the active one in the scene?
Are you starting play mode from another scene and coming into that scene through a scene change?
If you're arriving from another scene that replaces the Dialogue Manager, it's possible the SequencerShortcuts on the Dialogue Manager in the new scene is running its OnDisable() method before the Dialogue Manager is destroyed. The OnDisable() method will unregister the sequencer shortcuts. If you think this is what's happening:
1. As a test, temporarily remove the SequencerShortcuts from the Dialogue Manager. Add it to a GameObject in the scene with the Timeline conversation. If this works, then the problem is probably what I described above.
2. Put the SequencerShortcuts back on the Dialogue Manager. When arriving from another scene, make sure to destroy the new Dialogue Manager in Awake(), so it won't run its OnEnable()/OnDisable() methods.
Re: Sequencer Parser question
Hi, I think it was unregistered and I am coming from another scene to the scene.
I just changed my game's system to always instantiate a new DialogueSystermController prefab every time I load a new scene without DontDestroyOnLoad.
Basically, the old one will be destroyed when the new scene is loaded.
What I currently have setup should do below but let me know if this is something not DialogueSystem is designed for!
SceneLoaded -> new DialogueSystemController prefab instantiated -> gameplay/dialogue goes here -> When new scene is loaded : originally instantiated DialogueSystemController prefab will be destroyed. - SceneLoaded -> new DialogueSystemController prefab instantiated .. repeat
Would this be fine?
p.s I changed the thread subject to be question rather than a bug
I just changed my game's system to always instantiate a new DialogueSystermController prefab every time I load a new scene without DontDestroyOnLoad.
Basically, the old one will be destroyed when the new scene is loaded.
What I currently have setup should do below but let me know if this is something not DialogueSystem is designed for!
SceneLoaded -> new DialogueSystemController prefab instantiated -> gameplay/dialogue goes here -> When new scene is loaded : originally instantiated DialogueSystemController prefab will be destroyed. - SceneLoaded -> new DialogueSystemController prefab instantiated .. repeat
Would this be fine?
p.s I changed the thread subject to be question rather than a bug
Re: Sequencer Parser question
That's fine, but it may reset Dialogue System data between scene changes. If you need to remember values across scene changes, keep the same Dialogue Manager when you change scenes.
Have you tried ticking the Dialogue Manager's Don't Destroy On Load checkbox?
Have you tried ticking the Dialogue Manager's Don't Destroy On Load checkbox?