Selector is not working

Announcements, support questions, and discussion for the Dialogue System.
CalamaBanana
Posts: 5
Joined: Tue Jan 08, 2019 8:56 am

Re: Selector is not working

Post by CalamaBanana »

Thank you, you made me notice I was still using the old version.

Unity was being weird and installed the files from the old version I downloaded two years ago, despite claiming they were the newest version in the package manager, not allowing me to update (As it said I was up-to-date). Manually deleting the files solved that one.

Everything works now, got the 2D enabled. Thank you again.
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Selector is not working

Post by Tony Li »

That's a bug in Unity's Package Manager window. Even though it says it will download the latest version of an asset, it keeps the old version that's already in your download cache.

If you're using a version of Unity that still has the Asset Store window, you can download the latest versions of assets in the Asset Store window. Otherwise you'll have to delete the old version from your download cache and refresh the Package Manager window before you can download the latest version.
starfoxy
Posts: 3
Joined: Mon Oct 04, 2021 7:22 pm

Re: Selector is not working

Post by starfoxy »

This post has helped me greatly. I too am using 2D and my issue (as mentioned earlier in the thread) was I was missing a 2D collider.

However, although I can move my mouse over my Usable (NPC) and press space to activate the conversation, I don't get any hover text indicator that shows my NPC as usable. Any idea why I wouldn't be seeing that text indicator on hover?

Thank you kindly!

**update**

I realized that I had unchecked 'Use Default GUI' on my Player selector. When I revert back to using Default GUI, the hover text works as it should. Is there a trick to being able to use TextMeshPro instead of the Default GUI?
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Selector is not working

Post by Tony Li »

Hi,
starfoxy wrote: Mon Oct 04, 2021 7:37 pmI realized that I had unchecked 'Use Default GUI' on my Player selector. When I revert back to using Default GUI, the hover text works as it should. Is there a trick to being able to use TextMeshPro instead of the Default GUI?
Add a Selector Use Standard UI Elements component to the same GameObject as your Selector.

Your Dialogue Manager GameObject probably already has an Instantiate Prefabs component that instantiates a copy of the Basic Standard UI Selector Elements prefab. If your Selector has a Selector Use Standard UI Elements components, it will located the Basic Standard UI Selector Elements and use it instead of the default GUI. Duplicate the prefab, assign the duplicate to Instantiate Prefabs instead of the original, and then customize the duplicate.

To customize it with TextMeshPro, enable TextMeshPro Support in the Welcome Window. Then unassign the Text fields in the prefab. This will reveal TextMeshPro fields that you can assign.
starfoxy
Posts: 3
Joined: Mon Oct 04, 2021 7:22 pm

Re: Selector is not working

Post by starfoxy »

Very helpful, thank you Tony. I am loving this asset! I will give it a go and report back. :D

--update--

I was able to duplicate the prefab Basic Standard UI Selector Elements, assign it to the instantiate prefabs component on the Dialogue Manager and went into my new Basic Standard UI Selector Elements prefab to change the two text fields.

I was sort of successful but not completely.

My first question would be which TextmeshPro component should I be using - TextMeshPro Text or TextMeshPro Text (UI)?

Also, my text/textmeshpro fields are no longer being populated. If I have text in the textarea, it displays that but it's not displaying (for example) the Default Use Message text dynamically coming from the selector component on my player.

(It was working before but I would like to understand how to enable those two text fields being populated inside of the Basic Standard UI Selector Elements prefab.) :)
starfoxy
Posts: 3
Joined: Mon Oct 04, 2021 7:22 pm

Re: Selector is not working

Post by starfoxy »

Thank you for any insight that you can provide.

-- update if this helps anyone else --

When I was adding/removing my text/TextMeshPro components, I had broken the reference located on Standard UI Selector Elements component so I had to drag them into their respective fields again to get the text populating as it should.

And I answered my own question previously from seeing those fields - TextMeshPro (UI) seems to be the one it needs.
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Selector is not working

Post by Tony Li »

Thanks for sharing the follow-up. I'm glad that it sounds like everything's working now! :-)
Post Reply