NPC conversation working in Editor but not Build

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
lostmushroom
Posts: 194
Joined: Mon Jul 01, 2019 1:21 pm

NPC conversation working in Editor but not Build

Post by lostmushroom »

Hey guys. I have an NPC which should begin a conversation on Start. It's a text-based game so this NPC essentially 'begins' the game by initiating the text. It works correctly in Editor, but when I create a build, the conversation doesn't start, so the game can't begin.

I tried setting it to work on Use instead, but still the same.

Not sure if this is a Dialogue System thing or a Unity thing. Any help is appreciated as always :)
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC conversation working in Editor but not Build

Post by Tony Li »

Hi,

Make a Development Build and check if it prints any error messages. It should log errors onscreen and warnings in the Player.log file.

As a test, you can select Add Actions > Show Alert and type in an alert message. Check if the build shows the alert message. (Inspect the Dialogue Manager's Alert Settings and allow alerts during conversations.)
lostmushroom
Posts: 194
Joined: Mon Jul 01, 2019 1:21 pm

Re: NPC conversation working in Editor but not Build

Post by lostmushroom »

No error messages, but I tried the Alert test and it worked in the development build.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC conversation working in Editor but not Build

Post by Tony Li »

That means the Dialogue System Trigger is firing, which is a good first step. Please try these things:

1. Add an AudioWait() sequencer command to the first node after <START> in the conversation. Specify an audio file such as one of the dialogue lines in the Demo's Resources folder. When you play the build, check if you hear the audio.

2. Set the Dialogue Manager's Debug Level to Info. Make a dev build. Check the Player.log file / output_log.txt file for logs indicating that the conversation has started.

3. Temporarily assign the Basic Standard Dialogue UI to the Dialogue Manager. Maybe the issue is with the dialogue UI.
lostmushroom
Posts: 194
Joined: Mon Jul 01, 2019 1:21 pm

Re: NPC conversation working in Editor but not Build

Post by lostmushroom »

Hey Tony, thanks for your help.

I followed these steps. I can hear the audio on start. The output log seems to indicate that the conversation has started. I assigned the Basic Dialogue UI and the issue is still the same.

It feels like this is gonna end up being something really annoying like that the UI is showing up offscreen or something, but I don't know why it would be behaving differently between the editor and the build.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC conversation working in Editor but not Build

Post by Tony Li »

If you're in VR, make sure you're not using a Screen Space - Overlay canvas or a legacy Unity UI dialogue UI. They're not visible in VR.

As another test, try adding a Canvas Scaler to the canvas if it doesn't already have one. Change it to Scale With Screen Size.
lostmushroom
Posts: 194
Joined: Mon Jul 01, 2019 1:21 pm

Re: NPC conversation working in Editor but not Build

Post by lostmushroom »

Omg, the canvas scaler worked. Thanks so much, I was ready to delete this entire project lol
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC conversation working in Editor but not Build

Post by Tony Li »

Glad to help!
Post Reply