Author Topic: TMP_Dropdown Blocker Not Working  (Read 51 times)

dmcondolora

  • Newbie
  • *
  • Posts: 24
TMP_Dropdown Blocker Not Working
« on: August 23, 2018, 02:51:08 PM »
Using TMP 1.2.4 and 1.3 on Unity 2018.2.3f1, I've noticed that the 'Blocker' created when a TMP_Dropdown is shown no longer works. Clicking in the 'Blocker' area doesn't close the dropdown, and the Blocker's Button component shows that the OnClick list is empty:

[ Guests cannot view attachments ]

The code to add the OnClick listener looks good. Any ideas?

Thanks!

- David

dmcondolora

  • Newbie
  • *
  • Posts: 24
Re: TMP_Dropdown Blocker Not Working
« Reply #1 on: September 04, 2018, 01:54:52 PM »
Bumping this, as I'm trying to update my game and this is one of the problems yet to be solved.

Thanks,

- David

Stephan B.

  • Administrator
  • Hero Member
  • *****
  • Posts: 5617
Re: TMP_Dropdown Blocker Not Working
« Reply #2 on: September 05, 2018, 03:39:37 PM »
Any chance you can throw together a quick repro scene for me to look at?

dmcondolora

  • Newbie
  • *
  • Posts: 24
Re: TMP_Dropdown Blocker Not Working
« Reply #3 on: September 11, 2018, 03:05:18 PM »
I did some additional testing, and the Blocker is actually working, but only when the Canvas's Render Mode is set to "Screen Space - Overlay". Do you know why this might be?

Thanks!

- David

Stephan B.

  • Administrator
  • Hero Member
  • *****
  • Posts: 5617
Re: TMP_Dropdown Blocker Not Working
« Reply #4 on: September 11, 2018, 10:24:38 PM »
I did some additional testing, and the Blocker is actually working, but only when the Canvas's Render Mode is set to "Screen Space - Overlay". Do you know why this might be?

Thanks!

- David

I do not know but I'll ask around at Unity.

dmcondolora

  • Newbie
  • *
  • Posts: 24
Re: TMP_Dropdown Blocker Not Working
« Reply #5 on: September 12, 2018, 06:26:26 AM »
Hi Stephan,

I did some more digging on my end, and this was entirely my issue. I'm sorry to take up your time with it!

My TMP_Dropdown object is on the UI layer, which is rendered by a separate camera. In the current release of my game, I had modified the TMP_Dropdown.cs script to put the Blocker on the same layer as the TMP_Dropdown object. When I updated both Unity and TMP to the latest version, that change was lost, and I had forgotten that I even made it. As soon as I restored the change, the Blocker works as expected.

Should the CreateBlocker() function set the Blocker to the same layer as the TMP_Dropdown object by default? Seems like it should to me as an end-user, but maybe that wouldn't fit with your design.

In any case, problem solved. Thanks for your help!

- David