UI problems

Announcements, support questions, and discussion for Quest Machine.
Post Reply
KKL
Posts: 6
Joined: Thu Apr 28, 2022 12:42 pm

UI problems

Post by KKL »

I am working on a VR project using the VRIF (VR Interaction Framework) and Quest Machine.
I will need 2 types of Canvas:
1) Screen Space - Overlay: For HUD to be always displayed
2) World Space render mode: Only to display the Quest Dialogue UI

My Question is: How can I separate the HUD UI from Dialogue UI and make them into 2 types of Canvas so that they would show up right using Quest Machine?

Thanks so much! :D
User avatar
Tony Li
Posts: 21980
Joined: Thu Jul 18, 2013 1:27 pm

Re: UI problems

Post by Tony Li »

Hi,

You can just separate them. There's no requirement that any of Quest Machine HUDs must be inside the Quest Machine GameObject's Canvas. They can be in any Canvases you want. Just remember to assign them to the Quest Machine GameObject's Default Dialogue UI, Default HUD, etc., fields so Quest Machine knows where to find them.
KKL
Posts: 6
Joined: Thu Apr 28, 2022 12:42 pm

Re: UI problems

Post by KKL »

Thank you for your guidance, I have separated HUD and AlertUI from quest machine canvas. Currently, HUD works quite well in my project. However, AlertUI can't show as expected. Here is part of the error log.

Code: Select all

Message System exception sending 'Quest Alert'/'exploreCircleamdReturn' to Quest Machine (PixelCrushers.QuestMachine.Wrappers.QuestAlertDisplayer): Object reference not set to an instance of an object
UnityEngine.Debug:LogError (object)
PixelCrushers.MessageSystem:SendMessageWithTarget (object,object,string,string,object[]) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Message System/MessageSystem.cs:358)
PixelCrushers.MessageSystem:SendMessage (object,string,PixelCrushers.StringField,object[]) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Message System/MessageSystem.cs:454)
PixelCrushers.QuestMachine.QuestMachineMessages:QuestAlert (object,PixelCrushers.StringField,System.Collections.Generic.List`1<PixelCrushers.QuestMachine.QuestContent>) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Utility/QuestMachineMessages.cs:215)
PixelCrushers.QuestMachine.AlertQuestAction:Execute () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Subasset/Quest Action/AlertQuestAction.cs:51)
PixelCrushers.QuestMachine.Quest:ExecuteStateActions (PixelCrushers.QuestMachine.QuestState) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest.cs:942)
Much appreciate for your guidance!
User avatar
Tony Li
Posts: 21980
Joined: Thu Jul 18, 2013 1:27 pm

Re: UI problems

Post by Tony Li »

Hi,

Please try this patch:

PixelCrushersMessageSystemPatch_2022-05-01.unitypackage

Let me know if it gets rid of the error message. Also please let me know if the alert doesn't show up. It does some extra checking to prevent the error message, but it's possible that the root issue is a a configuration error in your quest.
KKL
Posts: 6
Joined: Thu Apr 28, 2022 12:42 pm

Re: UI problems

Post by KKL »

After I update the patch seems the logs remains the same.

Is that means problems may come from my own side?
User avatar
Tony Li
Posts: 21980
Joined: Thu Jul 18, 2013 1:27 pm

Re: UI problems

Post by Tony Li »

Hi,

Can you send a reproduction project to tony (at) pixelcrushers.com?

If not, what is line 454 of your MessageSystem.cs script?
KKL
Posts: 6
Joined: Thu Apr 28, 2022 12:42 pm

Re: UI problems

Post by KKL »

MessageSystem.cs row 454:

Code: Select all

SendMessageWithTarget(sender, null, message, StringField.GetStringValue(parameter), values);
User avatar
Tony Li
Posts: 21980
Joined: Thu Jul 18, 2013 1:27 pm

Re: UI problems

Post by Tony Li »

Hi,

Thanks. Would it be possible for you to send me a reproduction project?
KKL
Posts: 6
Joined: Thu Apr 28, 2022 12:42 pm

Re: UI problems

Post by KKL »

Yes :) I have just sent the email, please kindly have a look! :D
User avatar
Tony Li
Posts: 21980
Joined: Thu Jul 18, 2013 1:27 pm

Re: UI problems

Post by Tony Li »

Hi,

Thank you for sending the reproduction project. I replied to your email.
Post Reply