Page 1 of 1
Sequencer Parser question
Posted: Sat Dec 19, 2020 10:29 pm
by fkkcloud
Hi,
I have registered a sequence shortcut like below.
- sequencer_register.png (17.89 KiB) Viewed 179 times
Then, I use it like below which works for the most case of mine.
- sequence_inbox.png (12.3 KiB) Viewed 179 times
For this specific dialogue that is not working, I am calling Continue() via
Timeline to get to this specific dialogue node.
- timeline.png (24.13 KiB) Viewed 179 times
Then I get below warning and it does now work.
- warning.png (47.7 KiB) Viewed 179 times
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)
Re: Sequencer Parser bug
Posted: Sat Dec 19, 2020 11:16 pm
by Tony Li
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.
Re: Sequencer Parser question
Posted: Sat Dec 19, 2020 11:51 pm
by fkkcloud
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
Re: Sequencer Parser question
Posted: Sun Dec 20, 2020 9:57 am
by Tony Li
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?