Hello all,
I'm having an issue trying to get cutscenes working properly using Dialogue System.
Right now, I have a main player camera, and a cutscene camera (called "BonusCam"). I'm attempting to make it where my conversations will switch between the traditional main camera and my bonus camera throughout the conversation, with the bonus camera moving around using animations (to simulate a film-like "direction"). So I have the "Animation" component with the animation attached to the BonusCam object.
So right now I have in a node's sequence "SwitchCamera(BonusCam);" which works totally fine. But next, I have "Animation(cutscene1[BonusCam])" which doesn't work. The camera still changes, but doesn't move (presumably because the animation isn't playing). I'm not getting anything in the console to clue me in on why this isn't occurring exactly.
Some other tidbits:
- I thought it may be related to my dialogue time mode being "Realtime" instead of "Gameplay", but I haven't tested yet because for some reason changing it causes no dialogue to display at all (outside of character names/portraits)
- I've tried to use a few variations switching between the "Sequence" and "Response Menu Sequence" but to no avail. Have also tried using some delays to call the animation a few seconds after the camera switch, but that's also not happening.
- My BonusCam is set to be the sequencer camera in my Dialogue Manager settings.
- The animation is set to legacy (I saw that was a common issue people had so wanted to rule it out)
- While the game is running, if I select the clone of BonusCam that Dialogue Manager creates and hit play on the animation tab, the animation will play in the game view. That's about as close as I've gotten to it actually working.
Apologies in advance for being extremely dumb, bad at coding, and using the legacy animation tool, which all probably hurt my chances of fixing this. But thanks all the same for reading.
Animation not triggering in Response Menu Sequence
-
- Posts: 3
- Joined: Fri Jan 15, 2021 2:20 pm
Re: Animation not triggering in Response Menu Sequence
Hi,
I think it's just a syntax thing with the sequencer command. Try this:
The square brackets in the command reference are a typesetting convention. They indicate that a parameter is optional. So, for example, in:
Animation(animation, [GameObject])
the GameObject parameter is optional. If omitted, it defaults to the GameObject that's being used as the dialogue entry's speaker.
Legacy animation is absolutely fine! In fact, unless you're using a lot of blend trees, legacy is more efficient than Mecanim, albeit without Mecanim's neat visual state machine.armsofsleep wrote: ↑Fri Jan 15, 2021 2:38 pmSo I have the "Animation" component with the animation attached to the BonusCam object.
I think it's just a syntax thing with the sequencer command. Try this:
Code: Select all
Animation(cutscene1, BonusCam(Clone))
Animation(animation, [GameObject])
the GameObject parameter is optional. If omitted, it defaults to the GameObject that's being used as the dialogue entry's speaker.
-
- Posts: 3
- Joined: Fri Jan 15, 2021 2:20 pm
Re: Animation not triggering in Response Menu Sequence
I used your syntax (and tried a few variants with/without the added (clone) part) but am still seeing same results. Still no error messaging either.Tony Li wrote: ↑Fri Jan 15, 2021 3:55 pm Hi,Legacy animation is absolutely fine! In fact, unless you're using a lot of blend trees, legacy is more efficient than Mecanim, albeit without Mecanim's neat visual state machine.armsofsleep wrote: ↑Fri Jan 15, 2021 2:38 pmSo I have the "Animation" component with the animation attached to the BonusCam object.
I think it's just a syntax thing with the sequencer command. Try this:
The square brackets in the command reference are a typesetting convention. They indicate that a parameter is optional. So, for example, in:Code: Select all
Animation(cutscene1, BonusCam(Clone))
Animation(animation, [GameObject])
the GameObject parameter is optional. If omitted, it defaults to the GameObject that's being used as the dialogue entry's speaker.
I don't have too much else to go on sadly. I do see two clones of BonusCam in my hierarchy, one greyed out, but I assume that's normal (sorry if this is a silly observation). I've also tried multiple methods of ensuring that BonusCam was indeed being used as the sequencer camera, both using the setting in the Dialogue Manager and attaching the "Use As Sequencer Camera" script to the BonusCam object.
Another experiment I tried was to set the Animation to play automatically, and then set the node to activate the Animation component during the response menu sequence, but that didn't work either.
Good to hear about the legacy animation though! I'm relatively unskilled so far (Dialogue System being a huge help in performing much of my heavy lifting) so I rely a lot on the simplest solutions possible to most of my coding problems.
One last note, at the moment, BonusCam is a child of my Dialogue Manager (along with my UI and some other stuff related to conversations as a whole). I don't think that could be causing issues but figured anything is worth mentioning.
I'll update with any more troubleshooting results. Going to keep experimenting with Dialogue Time Mode to see if that could be a troublemaker. EDIT: actually probably not a troublemaker as I can get camera switching to occur after X seconds just fine
Re: Animation not triggering in Response Menu Sequence
Hi,
Make sure Unity's time scale is left at 1 (i.e., not paused) during the conversation. You can select menu item Edit > Project Settings and keep an eye on the Time panel to see the current Time Scale. Depending on your Unity version, you may need to mouse over the Project Settings window to update it.
Are there any warnings or errors in the Console window?
Make sure Unity's time scale is left at 1 (i.e., not paused) during the conversation. You can select menu item Edit > Project Settings and keep an eye on the Time panel to see the current Time Scale. Depending on your Unity version, you may need to mouse over the Project Settings window to update it.
Are there any warnings or errors in the Console window?
-
- Posts: 3
- Joined: Fri Jan 15, 2021 2:20 pm
Re: Animation not triggering in Response Menu Sequence
Using the proper syntax and putting the Animation call in the Response Menu Sequence (and unchecking that sneaky pause game during conversation button) in unison all corrected my issue. My camera is now flying around making my cutscenes (slightly) way cooler. Thank you!Tony Li wrote: ↑Fri Jan 15, 2021 6:01 pm Hi,
Make sure Unity's time scale is left at 1 (i.e., not paused) during the conversation. You can select menu item Edit > Project Settings and keep an eye on the Time panel to see the current Time Scale. Depending on your Unity version, you may need to mouse over the Project Settings window to update it.
Are there any warnings or errors in the Console window?
Re: Animation not triggering in Response Menu Sequence
Awesome! Glad to help.