Broken Dropdown Prefab - Importing UI Control Examples into New Projecct #13
Replies: 3 comments 1 reply
-
Sorry to hear you're seeing some issues! Mind sharing the errors you're hitting? You'll need to include at least everything in both the "Assets/Prefabs" and "Assets/Scripts/Controls" folders from the UIControls repo into your own projects to get all the controls set up correctly. That said, it's also worth including the "Assets/Scripts/Input" and "Assets/Scenes" folders to verify all the necessary pieces have been moved over as expected - you can verify by opening the "Assets/Scenes/UIControls.unity" scene and hitting "Play" to do that validation. And if it's a brand new project, and you haven't imported the TMP Essentials yet, then you'll likely need to include the "TextMesh Pro" folder as well. |
Beta Was this translation helpful? Give feedback.
-
Upon further investigation, we were able to reproduce some similar errors. It seems to be unique to how the assets are imported into the new project. If you drag/drop them into Unity directly, the issue may appear (which is likely why it also appears when you create a Unity package). If you copy/paste them through File Explorer (on Windows) or Finder (on MacOS), then the errors don't come up. However, if you first drag/drop into Unity directly, then delete the files, then copy/paste through File Explorer or Finder, the issue persists unless you delete the contents of the project's Library folder. So copy/pasting through File Explorer/Finder only does not reproduce the issue if that's the first thing you try (or if you delete your Library). Apologies for not seeing the issue initially; unfortunately it's inconsistent. But we'll do some more testing with UIControls along with the other example projects to see if there's a larger issue going on and hopefully provide a solution. Thank you for bringing this to our attention! |
Beta Was this translation helpful? Give feedback.
-
Version 1.0.4 has been released with a workaround for this issue. Unity may still log warnings to the console (and in 2020, errors as well), however, the references to Unfortunately, this workaround does not apply to scenes, so if a scene is imported with an |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is mostly an FYI for folks that might come along later - or maybe there's a fix...
When importing the prefabs UI Controls examples into an existing project everything seems to work perfectly except for the dropdown. I tried importing by just dragging the folders into a new project as well as creating a Unity package and importing that. All with the same result - 4 errors thrown when clicking on the dropdown.
It appears that the visuals for the DropdownItem are no longer set. This can be fixed by setting the visuals to the "Toggle Visuals" and then providing values for the rest of the fields. With this fixed it seemly works perfectly.
Beta Was this translation helpful? Give feedback.
All reactions