UIPanel warning

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
jgifford
Posts: 5
Joined: Wed Mar 15, 2023 2:43 pm

UIPanel warning

Post 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 134 times
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIPanel warning

Post 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.
jgifford
Posts: 5
Joined: Wed Mar 15, 2023 2:43 pm

Re: UIPanel warning

Post 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!
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIPanel warning

Post by Tony Li »

Thanks! Glad to help.
Post Reply