Hey!
I created an opening cutscene for my game and I only want it to play after that cutscene has ended. I tried doing this by simply turning on the gameobject that contains that specific dialogue AFTER the cutscene ends via Unity animation and it works when I'm in Unity, but for some reason, it doesn't work when I create a build of the game. Is there a workaround?
Have dialogue occur after cutscene event
-
- Posts: 82
- Joined: Wed Mar 31, 2021 6:48 pm
Re: Have dialogue occur after cutscene event
Hi,
Another way to do it is to set a Dialogue System Trigger to OnUse. At the end of the cutscene, call its DialogueSystemTrigger.OnUse method.
In either case, there shouldn't be any difference between a build and editor playmode. However, keep in mind that the Dialogue Manager GameObject survives scene changes by default. Say you have a Dialogue Manager in scene 0 and a differently-configured Dialogue Manager in scene 1. If you play scene 1 directly in the editor, it will use scene 1's Dialogue Manager. However, if you play a build, scene 0's Dialogue Manager will survive into scene 1 and replace scene 1's Dialogue Manager.
Another way to do it is to set a Dialogue System Trigger to OnUse. At the end of the cutscene, call its DialogueSystemTrigger.OnUse method.
In either case, there shouldn't be any difference between a build and editor playmode. However, keep in mind that the Dialogue Manager GameObject survives scene changes by default. Say you have a Dialogue Manager in scene 0 and a differently-configured Dialogue Manager in scene 1. If you play scene 1 directly in the editor, it will use scene 1's Dialogue Manager. However, if you play a build, scene 0's Dialogue Manager will survive into scene 1 and replace scene 1's Dialogue Manager.
-
- Posts: 82
- Joined: Wed Mar 31, 2021 6:48 pm
Re: Have dialogue occur after cutscene event
Does this still apply even if one of them is turned off?
For example, the way I have it set up is like this:
Scene 0(Main menu)
Start game
Scene 1(Level 1)
This is where the cutscene will happen and once done, the dialogue is meant to happen, I believe it's using the Main Menu's dialogue manager since I made sure to disable scene 1's dialogue system beforehand.
For example, the way I have it set up is like this:
Scene 0(Main menu)
Start game
Scene 1(Level 1)
This is where the cutscene will happen and once done, the dialogue is meant to happen, I believe it's using the Main Menu's dialogue manager since I made sure to disable scene 1's dialogue system beforehand.
-
- Posts: 82
- Joined: Wed Mar 31, 2021 6:48 pm
Re: Have dialogue occur after cutscene event
UPDATE:
Ok I think I fixed it. I just needed to make the specific conversation I needed to be inactive at the start and then make it active once the cutscene ended
Ok I think I fixed it. I just needed to make the specific conversation I needed to be inactive at the start and then make it active once the cutscene ended
Re: Have dialogue occur after cutscene event
Great! Sounds like it's working now.