Yeah. So I can't seem to find an easy way of doing this.
What I basically want to show is play a looping video of the speaking character during their dialogue.
You can currently assign a MovieTexture as a character's portrait graphic, but it will not play back automatically. I will implement this in v1.66.1 - thank you for the suggestion.
Attach this to your character's root, and assign their associated "speaking video clip" in the Inspector.
When that character speaks, the script will then search for a VideoPlayer component attached to a GameObject named "SpeechVideoPlayer". If you switch your Subtitles menu to Unity UI, you can add such a GameObject onto the UI Canvas and give it a VideoPlayer component.
The option should be in the Inspector for the clip itself, i.e. "Nine Inch Nails"
How would I do this? I have already chosen AC UI in the start.
If you're relying on the default AC menu set, then you can switch each of the provided menus to rely on Unity UI instead via the Source property within the Menu Manager.
Setting this to Unity Ui Prefab will then list its associated Canvas below. In the case of the default Subtitles menu, it's SubtitlesUI - which you can add the VideoPlayer to.
For more on "Unity UI menus", see the Manual chapter by the same name.
Comments
Welcome to the community, @DragoonHP.
You can currently assign a MovieTexture as a character's portrait graphic, but it will not play back automatically. I will implement this in v1.66.1 - thank you for the suggestion.
Thanks for the quick response Chris.
Do you have a general idea o when it will be released?
Also, until then, is there any other way of doing this?
You should be able to achieve this by pasting the following into the MenuGraphic.cs script:
Thanks a lot
Two more question:
If you're using 2018.2 or later, then yes - Unity are deprecating MovieTextures. Did you set your video's texture type to "Movie Texture"?
To make use of Unity's new VideoPlayer system, you'd need a separate script such as this:
http://pasteall.org/1442365/csharp
Attach this to your character's root, and assign their associated "speaking video clip" in the Inspector.
When that character speaks, the script will then search for a VideoPlayer component attached to a GameObject named "SpeechVideoPlayer". If you switch your Subtitles menu to Unity UI, you can add such a GameObject onto the UI Canvas and give it a VideoPlayer component.
I don't think I saw any option for that.
Video Object
Render Texture
Dialogue Settings
Subtitle Settings
How would I do this? I have already chosen AC UI in the start.
The option should be in the Inspector for the clip itself, i.e. "Nine Inch Nails"
If you're relying on the default AC menu set, then you can switch each of the provided menus to rely on Unity UI instead via the Source property within the Menu Manager.
Setting this to Unity Ui Prefab will then list its associated Canvas below. In the case of the default Subtitles menu, it's SubtitlesUI - which you can add the VideoPlayer to.
For more on "Unity UI menus", see the Manual chapter by the same name.
Thanks.