Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make TextMeshPro Support a required dependency instead of sample #219

Closed
janspaeth opened this issue Dec 18, 2024 · 9 comments
Closed

Make TextMeshPro Support a required dependency instead of sample #219

janspaeth opened this issue Dec 18, 2024 · 9 comments
Assignees
Labels
enhancement New feature or request released

Comments

@janspaeth
Copy link

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 janspaeth added the enhancement New feature or request label Dec 18, 2024
@mob-sakai
Copy link
Owner

Thank you for your reporting!

direct dependencies

What does this mean?

@mob-sakai mob-sakai added the need more info Need more information to help label Dec 21, 2024
@janspaeth
Copy link
Author

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

@mob-sakai
Copy link
Owner

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?

@janspaeth
Copy link
Author

janspaeth commented Dec 25, 2024

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 👍🏻

@mob-sakai
Copy link
Owner

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 mob-sakai removed the need more info Need more information to help label Dec 25, 2024
@janspaeth
Copy link
Author

Awesome, thank you!

@OzanDost
Copy link

OzanDost commented Jan 3, 2025

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?

@mob-sakai
Copy link
Owner

In practice, the TextMeshPro Essential Resources must be imported.

github-actions bot pushed a commit that referenced this issue Jan 3, 2025
# [3.2.0](3.1.2...3.2.0) (2025-01-03)

### Features

* automatically display a dialog to import samples for TextMeshPro or Spine ([a122057](a122057)), closes [#219](#219)
* change the minimum value of `SoftMaskable.power` from 1 to 0.5, allowing for smoother softness transitions ([3d59755](3d59755))
* Spine support ([7677a49](7677a49)), closes [#218](#218) [#221](#221)
* support `TextMeshPro/Bitmap` and `TextMeshPro/Mobile/Bitmap` shaders. ([6d4900c](6d4900c))
@mob-sakai
Copy link
Owner

🎉 This issue has been resolved in version 3.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

No branches or pull requests

3 participants