yasirkula / UnitySimpleFileBrowser

A uGUI based runtime file browser for Unity 3D (draggable and resizable)
MIT License
817 stars 111 forks source link

Remove legacy text and add Text Mesh Pro support #82

Open ababilinski opened 1 year ago

ababilinski commented 1 year ago

Replaces the legacy text component with text mesh pro. This also updates FileBrowser.CalculateLengthOfDropdownText() to calculate size based on TMP_FontAsset

yasirkula commented 1 year ago

Thank you for the pull request. For now, I'd like to keep the plugin as is and provide optional upgrade path via this plugin: https://github.com/yasirkula/UnityTextToTextMeshProUpgradeTool#upgrading-simplefilebrowser

ababilinski commented 1 year ago

Hi @yasirkula, I recommend updating to Text Mesh Pro since Unity UI Text is considered legacy and won't be updated,

The main reason for the pull request is to improve XR support for the asset. Using a world canvas with the legacy text component can lead to strange artifacts and blurry text. (see image of artifacts below)

image showing text artifacting when toggling a world canvas on and off

Using your other helpful tool makes the conversion a lot easier, but it can cause merge conflicts when trying to keep the plugin inside a project up to date.

yasirkula commented 1 year ago

Hmm, I may switch to TMP completely as you've suggested. For the time being though, my backlog is overflowing with other tasks (namely daily job tasks and RuntimeInspector tasks). Afterwards, I'd like to use my tool to convert to TMP which I'm used to 🐱

yasirkula commented 1 year ago

Thanks for bringing this to my attention BTW. I don't think I was aware of the black text issue.