Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
4
Question by Binouze · Jun 06, 2017 at 07:11 AM · assetbundletextmesh

problem with assets bundles and text mesh pro

Hi, I have a problem with Textmesh pro and the asset bundles. I try to reduce the webgl build size by using assets bundles all seems to work good except that all TextMeshPro texts in the loaded scenes loose their Font Asset linkage so they are all blank. All texts in the instancied prefabs are ok. When I use the rich text tag its ok.

I tried to add all the fonts assets and shaders in an AssetBundle loaded before any other but the problem is the same for all texts in the scene, still ok for prefabs and rich text tag font.

I tried to not load the AssetBundle containing the fonts assets and shaders and now the texts in scene loose their Material linkage so they all have default material, but they have the correct font asset, still ok for prefabs and rich text tag font.

My head start burning and I don't know what to do with these texts. Anybody can help me ?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by sandolkakos · Jun 15, 2018 at 01:48 PM

Try to execute the @Prodigga steps in his post: https://forum.unity.com/goto/post?id=2278648#post-2278648

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Binouze · Jun 06, 2017 at 08:03 AM

The text in prefabs inside an AssetBundle don't work too, same problem as the texts in the loaded scene, font asset link broken.

I tried to remove all TextMeshPro instance that was outside an asset bundle that could cause conflict. Now the only thing I load by default in the build is My Main loading Scene with just an image on it and lot of scripts but nothing related to TextMeshPro.

All other scene are in AssetsBundles, all scene assets are in separate AssetBundles, and I have a common asset bundle with all common textures and the TextMeshPro font assets, materials and shaders.

Help please ;)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Binouze · Jun 06, 2017 at 09:15 AM 0
Share

Okay after making a WebGL build all is okay and my build is 30$$anonymous$$o lighter than the one without AssetBundle.

But not working in the Editor make the development far harder ! Any way to make it work on editor ?

avatar image
0

Answer by brinca · Jun 14, 2018 at 05:13 AM

The problem is that Asset Bundles are compiled for specific platforms, and while static assets such as images tend to be more cross platform, dynamic assets such as shaders have to be compiled for the specific target platform, and will certainly not work on other platforms (which is why you're probably seeing pink squares, indicating that the shader could not be loaded).

The solution is to compile the asset bundle for the platform you're running the editor in (e.g. StandaloneOSXUniversal or StandaloneWindows) and load those bundles while testing in the editor.

An arguably better solution would involve faking the asset bundle behaviour while in the editor, simply by loading the assets directly from the source folders (using AssetDatabase) instead of the actual bundle. This is a bit more complex but has the added benefit of not having to compile the asset bundles every time you make a change to the original assets.

Lastly, Unity provides an AssetBundle Manager that does all of that, which has since been deprecated, but may be useful for people using older Unity versions.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JonPQ · Aug 14, 2018 at 08:02 PM 0
Share

I'm on Unity 5.6 using asset bundle manager and we are already bundling per platform. That is unfortunately not the issue. T$$anonymous$$P distance field works.... but if it also uses a gradient texture or shadow feature, it does not work properly, and renders as flat white, losing all color, shadows and gradients. Everything looks great in unity. broken on iOS and android (all devices high spec to low spec)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

113 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Fix TextMesh Pro UI outline shader artifacts 4 Answers

unity3d Network Instantiate from Assetbundle 0 Answers

GetData from AudioSource after AudioLowPassFilter 0 Answers

Unity 5.5 Beta crash caused by terrain base map distance 0 Answers

Build game with asset bundle marked assets 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges