Play video

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Walkius
Posts: 1
Joined: Mon Apr 28, 2025 9:55 am

Play video

Post by Walkius »

Hello everyone,
I'm stuck on something since two days (and ChatGPT can't help me). For my Visual Novel style game, I use Dialogue System for Unity.
I have a conversation that start with a video mp4(I'm using AVProVideo). I have my VideoPlayer on the scene (separate canvas than Dialogue Manager) and I'm able to start it with a Sequence in my node. But when it's done, it doesn't continue on the next node.
I tried several things but can't get to do it.
Any idea?
Thanks.
User avatar
Tony Li
Posts: 23251
Joined: Thu Jul 18, 2013 1:27 pm

Re: Play video

Post by Tony Li »

Hi,

Here are two ways to handle it:

1. The easy way: I'll assume you're starting the video by activating the VideoPlayer's GameObject. However, you could also start the video by enabling its component using the SetEnabled() sequencer command or call its Play() method using the SendMessage() sequencer command. In any case, determine how long the video is. Then use the Continue()@# command where # is the duration of the video. For example, say it's 30 seconds long:

Code: Select all

SetActive(MyVideo);
Continue()@30
2. The "better" way: Write a custom sequencer command that plays the video, waits for it to finish, and then calls Stop(). This way you don't need to know the video duration. And if the video duration changes, you don't have to update the sequence.
Post Reply