Page 1 of 1

UIPanel warning

Posted: Fri Mar 17, 2023 7:46 pm
by jgifford
Hello!

I am using Runic Standard Dialogue UI. The Dialogue Panel under the Runic Standard Dialogue UI gameobject logs a warning when starting or ending a conversation. The warning is

Code: Select all

Parameter '' does not exist.
UnityEngine.Animator:ResetTrigger (string)
PixelCrushers.UIPanel:Open () (at Assets/Plugins/Pixel Crushers/Common/Scripts/UI/UIPanel.cs:230)
PixelCrushers.DialogueSystem.StandardUIDialogueControls:ShowPanel () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI/Standard/Dialogue/StandardUIDialogueControls.cs:92)
PixelCrushers.DialogueSystem.AbstractDialogueUI:Open () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI/Abstract/Dialogue/AbstractDialogueUI.cs:104)
PixelCrushers.DialogueSystem.StandardDialogueUI:Open () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI/Standard/Dialogue/StandardDialogueUI.cs:104)
PixelCrushers.DialogueSystem.ConversationView:Initialize (PixelCrushers.DialogueSystem.IDialogueUI,PixelCrushers.DialogueSystem.Sequencer,PixelCrushers.DialogueSystem.DisplaySettings,PixelCrushers.DialogueSystem.DialogueEntrySpokenDelegate) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:98)
PixelCrushers.DialogueSystem.DialogueSystemController:WarmUpConversationController () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueSystemController.cs:819)
PixelCrushers.DialogueSystem.DialogueSystemController:Start () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueSystemController.cs:523)
The function that logs the warning is

Code: Select all

        public virtual void Open()
        {
            if (panelState == PanelState.Open || panelState == PanelState.Opening) return;
            if (panelState == PanelState.Closing) animatorMonitor.CancelCurrentAnimation();
            m_frameLastOpened = Time.frameCount;
            panelState = PanelState.Opening;
            gameObject.SetActive(true);
            onOpen.Invoke();
            if (myAnimator != null && myAnimator.isInitialized) myAnimator.ResetTrigger(hideAnimationTrigger);
            animatorMonitor.SetTrigger(showAnimationTrigger, OnVisible, waitForShowAnimation);

            // With quick panel changes, panel may not reach OnEnable/OnDisable before being reused.
            // Update panelStack here also to handle this case:
            PushToPanelStack();
        }
The issue is that hideAnimationTrigger is blank when myAnimator.ResetTrigger(hideAnimationTrigger) is called. Should this line also check that hideAnimationTrigger is not blank before calling? Something like

Code: Select all

if (myAnimator != null && myAnimator.isInitialized && !string.IsNullOrEmpty(hideAnimationTrigger)) myAnimator.ResetTrigger(hideAnimationTrigger);
Screenshot 2023-03-17 184533.png
Screenshot 2023-03-17 184533.png (99.38 KiB) Viewed 132 times

Re: UIPanel warning

Posted: Fri Mar 17, 2023 7:53 pm
by Tony Li
Hi,

It should. I'll fix that in the next update. In the meantime, if you're not using the Animator component, remove it. This will also prevent the warning message.

Re: UIPanel warning

Posted: Fri Mar 17, 2023 8:00 pm
by jgifford
I just got this asset a few days ago and am loving it. Its going to save me so much time. And so far this is the best support I've seen for any product, Unity asset or not. Thank you Tony!

Re: UIPanel warning

Posted: Fri Mar 17, 2023 8:03 pm
by Tony Li
Thanks! Glad to help.