TMP Hide and Show errors

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

TMP Hide and Show errors

Post by nathanj »

Hi Tony,

I am getting the following errors in my scene with the TMP integration. What's happening (other than the onslaught of yellow flags) is that the the Retical UI and Selector text is not removed when an NPC is no longer selected.


Parameter 'Hide' does not exist.
UnityEngine.Animator:SetTrigger(String)
PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProSelectorDisplay:HideControls() (at Assets/Dialogue System/Third Party Support/TextMesh Pro/Scripts/Selector/TextMeshProSelectorDisplay.cs:242)
PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProSelectorDisplay:OnDeselectedUsable(Usable) (at Assets/Dialogue System/Third Party Support/TextMesh Pro/Scripts/Selector/TextMeshProSelectorDisplay.cs:214)
PixelCrushers.DialogueSystem.Selector:DeselectTarget() (at Assets/Dialogue System/Scripts/Supplemental/Utility/Selector.cs:471)
PixelCrushers.DialogueSystem.Selector:Run3DRaycast() (at Assets/Dialogue System/Scripts/Supplemental/Utility/Selector.cs:455)
PixelCrushers.DialogueSystem.Selector:Update() (at Assets/Dialogue System/Scripts/Supplemental/Utility/Selector.cs:281)

Animator is not playing an AnimatorController
UnityEngine.Animator:SetTrigger(String)
PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProSelectorDisplay:HideControls() (at Assets/Dialogue System/Third Party Support/TextMesh Pro/Scripts/Selector/TextMeshProSelectorDisplay.cs:242)
PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProSelectorDisplay:DisconnectDelegates() (at Assets/Dialogue System/Third Party Support/TextMesh Pro/Scripts/Selector/TextMeshProSelectorDisplay.cs:186)
PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProSelectorDisplay:OnDisable() (at Assets/Dialogue System/Third Party Support/TextMesh Pro/Scripts/Selector/TextMeshProSelectorDisplay.cs:146)

Parameter 'Hide' does not exist.
UnityEngine.Animator:SetTrigger(String)
PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProSelectorDisplay:HideControls() (at Assets/Dialogue System/Third Party Support/TextMesh Pro/Scripts/Selector/TextMeshProSelectorDisplay.cs:242)
PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProSelectorDisplay:Update() (at Assets/Dialogue System/Third Party Support/TextMesh Pro/Scripts/Selector/TextMeshProSelectorDisplay.cs:272)

I basically dragged the TMP demo scenes components into my scene, (added the TMP sector to my player and dragged the TMP dialogue manager). Also if I use my non-TMP Dialogue Manager I don't get any of the errors.

Sorry for being such a persistent character here lately.

Nathan
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: TMP Hide and Show errors

Post by Tony Li »

Hi Nathan,

Try removing the Animator component(s) from your selector UI.

If that doesn't do the trick, please let me know which versions of Unity and the Dialogue System you're using.

I'm finishing work for the day, but I'll check back in the morning.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: TMP Hide and Show errors

Post by nathanj »

Thanks Tony

There are no animators on those components.

One possible issue I can think it might be that I’m using cinemachine and have the world camera seperate from the main player. I’ll do a test in the morning (Eastern Australia) with cinemachime and ds. If it’s that I’ll send you the program files.

I’ll let you know either way.

Thanks again.
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: TMP Hide and Show errors

Post by Tony Li »

Hi Nathan,

If that doesn't work, let me know and I'll try to reproduce the issue over here.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: TMP Hide and Show errors

Post by nathanj »

Hey Tony,

So I was able to remove the errors posted above by bringing back in a fresh copy of the TMP demo scene Dialogue Manager component. Not sure what happened with the one I was working on yesterday but something must have been deleted or broken.

However, I'm still having one issue that persisted throughout, which is that when an object is unselected the Selector UI does not update. The Retical in Range icon and the Selection Text Panel text remains. It doesn't matter if I use the NPCs trigger or only move the cursor across (selecting and deselecting) the NPCs trigger area. Any idea why this would not be receiving a message to hide?
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: TMP Hide and Show errors

Post by Tony Li »

Hi Nathan,

Does the selector UI behave in the example scene?

If you've set the Selector's Select At to Mouse Position in your own scene, you can do the same in the example scene. It'll look a little weird because the example scene has a MouseLook script, but you can still mouse over Usables to make sure the selector UI appears and disappears.

If the example scene works, please compare the player's Text Mesh Pro Selector Display with your own player, and similarly compare the SF TextMeshPro Selector Panel to your own.

If that doesn't help, please feel free to email an example scene that exhibits the problem to tony (at) pixelcrushers.com. I'll be happy to take a look.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: TMP Hide and Show errors

Post by nathanj »

Thanks Tony

I'm sure it has something to do with Ultimate Survival's Raycast Manager. When I figure it out I'll let you know.

I just brought the Actor from the TMP Demo scene into my build and it worked as expected. I also tried it with Unity's default FPSController and it worked as expected.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: TMP Hide and Show errors

Post by nathanj »

The issue ended up being an Ultimate Survival script.

The Player Input Handler script was blocking the Raycast from sending an out of range message to the UI. By simply removing the unnecessary script all my Selector UI components are all updating properly.
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: TMP Hide and Show errors

Post by Tony Li »

Great! Glad to know it's working now.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: TMP Hide and Show errors

Post by nathanj »

So it wasn't actually that script mentioned above, it was a custom component a colleague had added to the player's hands.

I removed the "Hide" and "Show" Strings from the fields in the Text Mesh Pro Selector Elements and it worked. I'm not sure if this will cause an issue with the Bark system (Haven't checked if there is an Animator component on that) but I'll cross that bridge when I get to it. For now I'm thrilled everything is working!

So just to confirm, the Player Input Handler for Ultimate Survival is required. that was a mistake on my part.

Thanks for all your help.

Nathan
Post Reply