Inconsistent Dialogue UI Behavior Between Editor and Exported Build

Announcements, support questions, and discussion for Quest Machine.
Post Reply
DiegoGary25
Posts: 5
Joined: Wed Mar 05, 2025 11:42 am

Inconsistent Dialogue UI Behavior Between Editor and Exported Build

Post by DiegoGary25 »

Hey Team! I’m experiencing an inconsistent issue with Quest Machine’s dialogue UI in my project.
In Editor (Play Mode):

The dialogue UI displays the quest text correctly.
However, the quest giver’s name and icon are missing from the dialogue display.

In Exported Build (Development Build):

The quest giver’s name and icon appear as expected.
The dialogue text, however, is completely missing.

It's important to say that this only happens with this code as using the questgiver through startdialog works fine in my other npcs. I am assigning this quest throughout a action script, so, I have a "Guide" Gameobject with a QuestGiver script. And calling:

using UnityEngine;
using PixelCrushers.QuestMachine;

namespace PixelCrushers.QuestMachine
{
public class StartDialog : QuestAction
{
public QuestGiver questGiver;
public Quest curQuest;

public override void Execute()
{
base.Execute();

if (questGiver == null)
{
Debug.LogWarning("StartDialog: QuestGiver is null.");
return;
}
if (curQuest == null)
{
Debug.LogWarning("StartDialog: Current Quest is null.");
return;
}

// Create a QuestParticipantTextInfo using the quest giver's properties.
QuestParticipantTextInfo giverInfo = new QuestParticipantTextInfo(
questGiver.id,
questGiver.displayName,
questGiver.image,
questGiver.textTable
);

// Assign the quest giver info to the current quest.
curQuest.AssignQuestGiver(giverInfo);

Debug.Log("StartDialog: Assigned quest giver info. DisplayName: " + questGiver.displayName +
", Icon: " + (questGiver.image != null ? questGiver.image.name : "none"));
Debug.Log("StartDialog: Quest title = " + curQuest.title.value);

// Start the specified dialogue.
questGiver.StartDialogueWithPlayer();
}
}
}

In this script even the print is: StartDialog: Assigned quest giver info. DisplayName: Guide, Icon: villager_portrait

The text content is provided using BodyTextQuestContent objects, and these work fine in other quests.
I’ve double‑checked asset inclusion (fonts, sprites, and materials) and ensured that all necessary assets are referenced.
The issue only appears for one specific quest/dialogue setup; other quests’ dialogues show consistent behavior in both the Editor and the build.

Thanks !
User avatar
Tony Li
Posts: 22871
Joined: Thu Jul 18, 2013 1:27 pm

Re: Inconsistent Dialogue UI Behavior Between Editor and Exported Build

Post by Tony Li »

Hi,

Can you do this with less code? If quest isn't already in the quest giver's Quests list, add it using questGiver.AddAddQuest(curQuest). Then just call questGiver.StartSpecifiedQuestDialogueWithPlayer(). Unless there's more to your requirements than what's above, you don't need anything more. Example:

Code: Select all

using UnityEngine;
using PixelCrushers.QuestMachine;

namespace PixelCrushers.QuestMachine
{
    public class StartDialog : QuestAction
    {
        public QuestGiver questGiver;
        public Quest curQuest;

        public override void Execute()
        {
            base.Execute();
            if (questGiver == null)
            {
                Debug.LogWarning("StartDialog: QuestGiver is null.");
            }
            else if (curQuest == null)
            {
                Debug.LogWarning("StartDialog: Current Quest is null.");
            }
            else
            {
                if (!questGiver.FindQuest(curQuest.id)) questGiver.AddQuest(curQuest);
                questGiver.StartSpecifiedQuestDialogueWithPlayer(curQuest.id);
            }
        }
    }
}
DiegoGary25
Posts: 5
Joined: Wed Mar 05, 2025 11:42 am

Re: Inconsistent Dialogue UI Behavior Between Editor and Exported Build

Post by DiegoGary25 »

Hey, thanks for the reply ! Yes, it could be as easy as that code, I used to have something like that, but I still get the same Issue.
I am using the code so when I reach a specific Node, call this action script and then have the dialog pop up and say something related to that specific node to the player.
User avatar
Tony Li
Posts: 22871
Joined: Thu Jul 18, 2013 1:27 pm

Re: Inconsistent Dialogue UI Behavior Between Editor and Exported Build

Post by Tony Li »

Can you send a reproduction project to tony (at) pixelcrushers.com?
DiegoGary25
Posts: 5
Joined: Wed Mar 05, 2025 11:42 am

Re: Inconsistent Dialogue UI Behavior Between Editor and Exported Build

Post by DiegoGary25 »

I eneded up creating my own manager for guide dialogs as I realized this wasn't the best approach, thanks tho!
Post Reply