Dialogue manager canvas automatically adding parts when playing

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
annathehank
Posts: 95
Joined: Sun May 03, 2020 2:17 pm

Dialogue manager canvas automatically adding parts when playing

Post by annathehank »

Hi there,

I realized I needed a more robust quest log window that had the tabs based on groups, and I could not figure out how to alter the standard basic UI version to get it to work. So I downloaded the example for the tabbed version and imported it into my game and then copy/pasted the quest log window to my main dialogue manager canvas.

For some reason, when I hit play to test it out, the Basic Standard UI Selector Elements, Basic Standard Quest Tracker HUD, and Basic Standard Quest Log Window are being added to the canvas. They are not present when I'm in edit mode, but pop up when it goes to play.

Any idea where they're coming from and how to get them to stop? I did have the original Basic Standard Quest Log Window in the scene originally but deleted it for the tabbed version.

Thank you in advance!
annathehank
Posts: 95
Joined: Sun May 03, 2020 2:17 pm

Re: Dialogue manager canvas automatically adding parts when playing

Post by annathehank »

Also, the quests are not showing up, as if the UI isn't connecting to the manager database
And when I run the game I get this error

NullReferenceException: Object reference not set to an instance of an object
TabbedQuestLogWindow.ShowQuests (PixelCrushers.DialogueSystem.QuestState questStateMask) (at Assets/Dialogue System Examples/Tabbed Quest Log Example/TabbedQuestLogWindow.cs:30)

The only thing I've done to the tabbed script is add another group for the tabs
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue manager canvas automatically adding parts when playing

Post by Tony Li »

Hi,
annathehank wrote: Mon Mar 15, 2021 1:36 pm For some reason, when I hit play to test it out, the Basic Standard UI Selector Elements, Basic Standard Quest Tracker HUD, and Basic Standard Quest Log Window are being added to the canvas. They are not present when I'm in edit mode, but pop up when it goes to play.
The Instantiate Prefabs component on the Dialogue Manager GameObject is adding them. You can remove the component, disable or, or change the list of prefabs to instantiate.
annathehank wrote: Mon Mar 15, 2021 2:00 pmAlso, the quests are not showing up, as if the UI isn't connecting to the manager database
And when I run the game I get this error

NullReferenceException: Object reference not set to an instance of an object
TabbedQuestLogWindow.ShowQuests (PixelCrushers.DialogueSystem.QuestState questStateMask) (at Assets/Dialogue System Examples/Tabbed Quest Log Example/TabbedQuestLogWindow.cs:30)

The only thing I've done to the tabbed script is add another group for the tabs
In the inspector, make sure you've assigned the buttons (Main Mission Tab Button, Side Quests, Current Group, etc., as well as the Completed Quests button.
annathehank
Posts: 95
Joined: Sun May 03, 2020 2:17 pm

Re: Dialogue manager canvas automatically adding parts when playing

Post by annathehank »

Ahhhh. thank you! I forgot all about the prefabs!

And I was just about to post that I figured out the issue with the tabs not working right! I had to change the script that the subclass was calling to to the newer standard UI script since I didn't download the old one it's attached to in the prefab.

All is working smooth as can be now! Thank you so much for the prefab of the tabbed quest log. It's perfect!!!
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue manager canvas automatically adding parts when playing

Post by Tony Li »

Awesome! I'm glad it's working.
Post Reply