As you can see with the images, when I create a new textmesh pro dropdown and open the dropdown in play mode the scrollbar is in a weird position. No matter what I change in the template within the dropdown game object, the scrollbar still gets created in that same position. Has anyone else had this happen? What can I try to get this fixed? Thanks!
The structure of those dropdowns is crucial so make sure that when you are creating one, that is mirrors the structure of the Dropdown that is created when using the Create Menu option.
Upon further inspection, the pattern is that it puts the created scrollbar at exactly the midpoint of the dropdown list. It seems to not matter what I change in the with the scollbar transform within the template, it doesn’t affect the final scrollbar position. Also, this bug persists even after I uninstalled and reinstalled the latest unity update and textmesh pro update so I have no idea how to fix this.
I’m using unity version 2017.3.0f3 personal 64bit. And yes, this same thing happens to any new textmesh pro dropdowns that I create via the Create - UI - TextMeshPro - DropDown menu.
Those are the correct DLLs. I just tested on my end using Unity 2017.3.0f3 using the same package and everything is working fine. So we have some mystery on our hands.
Although you have already done this. Please try creating another new Empty project. Then import the TextMesh Pro package from the link for 2017.3 found in this thread and see if you get the same results.
If possible, can you create a video showing the steps you are taking to create the Dropdown from the Create - UI - TextMeshPro - Dropdown menu? I realize this might appear silly but like I said we have some mystery on our hands so let’s look at everything.
There’s a video of me creating the dropdown. As you can see at the end, the scrollbar is being pushed in the negative direction by half of the dropdown width. This is consistent for any dropdown width. Also, this was in a new project after i imported the package from the link you provided.
Had to a chance to look deeper into this and it is not a TextMesh Pro issue but as usual an issue that TextMesh Pro ends up exposing.
Although I do not know the exact source of the issue, I did find a work around where simply changing the Template child hierarchy will make the Scrollbar render at the correct place. The current order of the Template is :
Template
– Viewport
– Scrollbar
change to
Template
– Scrollbar
– Viewport
It looks like the issue is related to the RectTransform.SetParent() function where the number of child objects and clearly their position affects things.
Thanks so much for the help! I appreciate the time you spent trying to find a solution. I’m glad there’s an easy work around for it. Have a good rest of your day!
@Stephan-B I created a TextMeshPro dropdown and it seemed to be working fine in the Editor. When I ran a build on my iPhone, I noticed it seemed to be incorrect, displaying the dropdown as though it was already opened and not taking touch input. I was using Unity 2017.1 and the TextMeshPro plugin for the 2017.1 version. Do you know what may be causing this behavior?
@Stephan-B Yes, I can reproduce it. I believe it is related to a JIT exception that is thrown in xCode when the app is running on the iPhone. It says: [quote]
ExecutionEngineException: Attempting to JIT compile method
[/quote]
I had the player settings using the scripting runtime .Net3.5, Mono backend, and Api compatibility with the full .Net 2.0. I tried switching to the IL2CPP, but then when I built I got an error: [quote]
l2cpp/build/il2cpp.exe did not run properly!
[/quote] I think the IL2CPP build error might be related to some of the TextMeshPro dlls, but I could be wrong. Do you have any ideas what could be causing the first error? I’m running Unity 2017.1.2f1.
@Stephan-B The normal dropdown widget made by Unity seems to do this as well. Perhaps it is related to that. I’m guessing the TextMeshPro dropdown is just the normal Unity UI dropdown, but you replaced the Text component? My fix was to basically create my own dropdown prefab from separate Unity components and TextMeshPro components, but using the default ones seem to have these errors.