Unity-UI-Extensions/com.unity.uiextensions

BUG: DropDownList gives null exc if using TextMeshProUGUI rather than old Text

Closed this issue · 4 comments

Same root cause as issue #410, needs same solution. Presumably other classes are assuming the old Text too.

Closing as this is a duplicate of #410, the resolution is in the 2.3 branch and is getting released asap for the 2.3 release

Scratch that, I'm an idiot. Thanks for the report @WazWaz , will ensure to check all uses for old text vs textmesh pro and resolve

OK, need some feedback @WazWaz if you can respond, as digging into this is creating more problems than it is solving.

Would it be better to have the existing components update to use TextMeshPro for 2022, or introduce NEW TextMesh Pro versions (like Unity has) that can be used.

Essentially, there is NO forward path from Text to TextMeshPro, and even though I introduced fixes, this breaks backwards compatibility.

I probably ran into the same issues you did when I tried to work around. I ended up just using the Unity TMP_Dropdown. Now I don't remember why I wasn't using Unity's Dropdown before porting to use TMP. My code ended up cleaner when ported to use TMP_Dropdown too, so maybe it's time to deprecate DropDownList, which does nasty stuff like the hardcoded 0,4 offset and other messing with RectTransforms.

If you want to keep it, yes, I'd suggest a TMP_DropDownList, ideally one that respects the user's MainButton and template better.

Sorry I can't suggest more, now I've ported away.