Tony Li wrote: ↑Sun Apr 09, 2023 1:24 pm
Yes, and it works with Addressables. The basic documentation instructs you to put the background images in a folder named Resources. But Unity loads all files in Resources into memory when the game starts, so that's not practical for thousands of images. Instead, import the Addressables package and enable the Dialogue System's Addressables support in the Welcome Window. Then mark your images as Addressable and set their Key values to match their filenames (minus extension).
Thanks.
I think I got it to work.
I added the 'Handle Background Fields' script and The Background Canvas Game Object from the VN framework to my Dialogue Manager/Scene. It's easier this way than to adapt/edit the visual novel framework to my needs.
Then I imported the Addressables package and enabled Dialogue System's Addressables.
I had to update my unity to a newer version because using 2021.1.28f1 resulted in error messages from unity and the dialogue system.
After that I added an Adressables Group and added my images to that group.
With the command 'Background(nameofbackgroundimage)' in the sequencer field I can now change the background image for every conversation node.
After adding the images to the addressable group they got automatically moved from the resources folder to a new folder named Resources_moved. The Resources folder is now empty.
So now it should only load the addressable package which contains the specific image?
Am I right?
The last issue I have is the implementation of background vidoes:
I added an mp4 video to the addressables package and tried to call it in the sequencer with Background(videoname) after adding a video player component to the background canvas. But that doesn't work.
Any idea how to get background videos to work?
I think I have to write my own sequencer command but I can't even find the templates.
They aren't under templates anymore like it was shown in the sequencer tutorial video.
Where are they now?
Thanks.