Visual Novel Framework: Background Field not working.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
thatguynm
Posts: 3
Joined: Thu Mar 31, 2022 12:24 am

Visual Novel Framework: Background Field not working.

Post by thatguynm »

I am trying to set up the visual novel framework within my game, but I cannot get backgrounds working.

I have the background canvas in my scene, and everything appears to be set up correctly. However, whenever dialogue starts, the background doesn't update.

I added a new text field to the conversation settings titled 'Background', imported my background as a sprite and put it in a folder called 'Resources', and used the background's name as the value in the Background field. Is there a step I am missing? Do I need to enter the full file path as the background value? I'm sure there is some simple step I'm missing.

I will admit I am using the VN framework in a slightly nonstandard way (I am turning the background on just before the conversation starts, then turning it off afterward), but hopefully that isn't the cause.
User avatar
Tony Li
Posts: 21980
Joined: Thu Jul 18, 2013 1:27 pm

Re: Visual Novel Framework: Background Field not working.

Post by Tony Li »

Hi,

The GameObject with the BackgroundManager component must be active. Try activating the GameObject and disabling its Image component. Enable the Image component just before the conversation starts.

If that doesn't work, would you please confirm that backgrounds change in the example? (Dialogue System Extras / Visual Novel Framework / Example) Near the end of the example, the background will change to a rainy image.
thatguynm
Posts: 3
Joined: Thu Mar 31, 2022 12:24 am

Re: Visual Novel Framework: Background Field not working.

Post by thatguynm »

The example scene worked just fine.

I made the changes you suggested but still nothing. I even tried pitting my image in the Resources folder that came with the example scene thinking, 'maybe it's looking for a specific directory' but still nothing.
User avatar
Tony Li
Posts: 21980
Joined: Thu Jul 18, 2013 1:27 pm

Re: Visual Novel Framework: Background Field not working.

Post by Tony Li »

Hi,

Does your scene have a BackgroundManager component?

Does your Dialogue Manager have a HandleBackgroundFields component?

If both are true, are there any errors or warnings in the Console window?

If not, please feel free to send a reproduction project to tony (at) pixelcrushers.com. I'll be happy to take a look.
thatguynm
Posts: 3
Joined: Thu Mar 31, 2022 12:24 am

Re: Visual Novel Framework: Background Field not working.

Post by thatguynm »

Thank you so much! I didn't realize there was a handleBackgroundFields component. I added that and it worked perfectly. I feel dumb, but thank you for walking me through it and for all of your help!
User avatar
Tony Li
Posts: 21980
Joined: Thu Jul 18, 2013 1:27 pm

Re: Visual Novel Framework: Background Field not working.

Post by Tony Li »

Glad to help!
Post Reply