Page 1 of 1
UI problems
Posted: Thu Apr 28, 2022 12:47 pm
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!
Re: UI problems
Posted: Thu Apr 28, 2022 3:08 pm
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.
Re: UI problems
Posted: Sun May 01, 2022 2:16 pm
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!
Re: UI problems
Posted: Sun May 01, 2022 2:54 pm
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.
Re: UI problems
Posted: Mon May 02, 2022 7:48 pm
by KKL
After I update the patch seems the logs remains the same.
Is that means problems may come from my own side?
Re: UI problems
Posted: Mon May 02, 2022 8:18 pm
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?
Re: UI problems
Posted: Mon May 02, 2022 8:22 pm
by KKL
MessageSystem.cs row 454:
Code: Select all
SendMessageWithTarget(sender, null, message, StringField.GetStringValue(parameter), values);
Re: UI problems
Posted: Mon May 02, 2022 8:33 pm
by Tony Li
Hi,
Thanks. Would it be possible for you to send me a reproduction project?
Re: UI problems
Posted: Mon May 02, 2022 10:22 pm
by KKL
Yes
I have just sent the email, please kindly have a look!
Re: UI problems
Posted: Tue May 03, 2022 9:49 am
by Tony Li
Hi,
Thank you for sending the reproduction project. I replied to your email.