SoftMaskForUGUI icon indicating copy to clipboard operation
SoftMaskForUGUI copied to clipboard

Make TextMeshPro Support a required dependency instead of sample

Open janspaeth opened this issue 1 year ago β€’ 9 comments

The TextMeshPro Support and TextMeshPro (ugui 2.0) are currently available as optional sample imports in the UI Soft Mask package.

Could these be made into direct dependencies instead?

Our team frequently encounters rendering issues when designers and artists forget to import these samples. Making them required dependencies would help prevent these problems.

Thank you! tmp_support

janspaeth avatar Dec 18 '24 10:12 janspaeth

Thank you for your reporting!

direct dependencies

What does this mean?

mob-sakai avatar Dec 18 '24 11:12 mob-sakai

Thanks for a quick reply @mob-sakai πŸ™‡πŸ»β€β™‚οΈ

I suggest moving the TextMeshPro Support, and ShaderGraph Support components from Samples to the Dependencies section under "Is using.". This way they will be auto-imported with the package: sample-to-dependencies

janspaeth avatar Dec 23 '24 15:12 janspaeth

Careful consideration is required regarding package dependencies.

TextMeshPro Support and TextMeshPro Support (Unity 6) are mutually exclusive assets that need to be chosen based on the Unity version.
Additionally, in Unity versions prior to 2023.2, TextMeshPro is optional, and there are environments where it may not be installed.
If TextMeshPro Support or TextMeshPro Support (Unity 6) is imported into a project without TextMeshPro installed, shader errors will occur, making the build process fail.

Do you have any good ideas?

mob-sakai avatar Dec 24 '24 03:12 mob-sakai

Hmm fair points, I saw that you are already working on the tmpsupport import on load, that would've been my suggestion too. The simplest fix might be to warn users that TMP is installed but TMPSupport wasn't imported πŸ‘πŸ»

janspaeth avatar Dec 25 '24 12:12 janspaeth

Yes, I think that’s a great idea. πŸ‘

For example, in TextMeshPro, a dialog appears when the required resources have not yet been imported. Similarly, displaying a dialog when TextMeshPro requests the SoftMaskable shader would improve UX.

mob-sakai avatar Dec 25 '24 12:12 mob-sakai

Awesome, thank you!

janspaeth avatar Jan 03 '25 13:01 janspaeth

Careful consideration is required regarding package dependencies.

TextMeshPro Support and TextMeshPro Support (Unity 6) are mutually exclusive assets that need to be chosen based on the Unity version. Additionally, in Unity versions prior to 2023.2, TextMeshPro is optional, and there are environments where it may not be installed. If TextMeshPro Support or TextMeshPro Support (Unity 6) is imported into a project without TextMeshPro installed, shader errors will occur, making the build process fail.

Do you have any good ideas?

Can't this be solved by a preprocessor during package installation i.e #if TextMeshPro?

OzanDost avatar Jan 03 '25 13:01 OzanDost

In practice, the TextMeshPro Essential Resources must be imported.

mob-sakai avatar Jan 03 '25 14:01 mob-sakai

:tada: This issue has been resolved in version 3.2.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

mob-sakai avatar Jan 03 '25 14:01 mob-sakai