Play dialogue back to back scenes
Play dialogue back to back scenes
I have scenes that uses the dialogue editor back to back and when I play them individually they work, but when you get in game it plays the first scene fine, but not the second. I have both of the dialogue editors to trigger on the start of the scene. Any ideas?! I am kind of a beginner at this! Sorry!
Re: Play dialogue back to back scenes
No worries; cross-scene stuff is often a little complicated to set up in Unity.
Here's a good way to set it up:
1. Put both conversations in the same dialogue database. (I'm assuming you're talking about playing a conversation in each scene. If not, let me know and I'll update my suggestion.)
2. Put your Dialogue Manager GameObject in the first scene. Make sure Dont Destroy On Load and Allow Only One Instance are ticked. (These are the default values.)
This Dialogue Manager will carry through to the second scene.
3. You can also put a Dialogue Manager GameObject in your second scene. This will let you play the second scene in the editor without having to come in from the first scene. But keep in mind that, during regular gameplay, the Dialogue Manager from the first scene will carry over and destroy the one in the second scene.
4. Set up your Conversation Triggers (or Dialogue System Triggers) in each scene to play their respective conversations OnStart.
If it's not practical for you to merge your dialogue databases, here are two options:
1. Use the Dialogue Editor's Merge feature to combine them into one dialogue database, or
2. On both Dialogue Managers (one in each scene), untick Dont Destroy On Load. This will prevent the Dialogue Manager in the first scene from carrying over into the second and destroying the Dialogue Manager in the second scene. Be aware that the second scene won't have access to any variables you defined in the first scene's dialogue database, since they'll be using separate databases.
If that doesn't help, please let me know:
Here's a good way to set it up:
1. Put both conversations in the same dialogue database. (I'm assuming you're talking about playing a conversation in each scene. If not, let me know and I'll update my suggestion.)
2. Put your Dialogue Manager GameObject in the first scene. Make sure Dont Destroy On Load and Allow Only One Instance are ticked. (These are the default values.)
This Dialogue Manager will carry through to the second scene.
3. You can also put a Dialogue Manager GameObject in your second scene. This will let you play the second scene in the editor without having to come in from the first scene. But keep in mind that, during regular gameplay, the Dialogue Manager from the first scene will carry over and destroy the one in the second scene.
4. Set up your Conversation Triggers (or Dialogue System Triggers) in each scene to play their respective conversations OnStart.
If it's not practical for you to merge your dialogue databases, here are two options:
1. Use the Dialogue Editor's Merge feature to combine them into one dialogue database, or
2. On both Dialogue Managers (one in each scene), untick Dont Destroy On Load. This will prevent the Dialogue Manager in the first scene from carrying over into the second and destroying the Dialogue Manager in the second scene. Be aware that the second scene won't have access to any variables you defined in the first scene's dialogue database, since they'll be using separate databases.
If that doesn't help, please let me know:
- Are you playing a conversation in each scene OnStart? If so, are they in the same database or separate databases?
- What trigger component are you using? (e.g., Conversation Trigger)
- How are you changing scenes?
Re: Play dialogue back to back scenes
Thank you for your help! After reading your tips, I toyed with my game a bit and figured out to uncheck the don't destroy on load button because each scene has their own dialogue systems.
Re: Play dialogue back to back scenes
Happy to help!