Skip to content

iOS build fails to display TextMeshPro sprites/emojis due to unpacked sprite warnings in clean CI build #3

Answered by vanifatovvlad
KonStg asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,
Unfortunately, I can't test the build on CI for iOS. A possible solution is to re-import the plugin assets as a pre-build step. Can you try this?
Sample code:

public static void PreBuildMethod() {
  var paths = Directory.EnumerateFiles("Assets/", "*.tmpspriteatlas", SearchOption.AllDirectories);

  foreach (var tmpAtlasPath in paths) {
    var text          = File.ReadAllText(tmpAtlasPath);
    var atlasGuid     = JsonUtility.FromJson<TextMeshProSupportAssetData>(text).atlasGuid;
    var iconAtlasPath = AssetDatabase.GUIDToAssetPath(atlasGuid);

    AssetDatabase.ImportAsset(iconAtlasPath, ImportAssetOptions.ForceUpdate | ImportAssetOptions.ForceSynchronousImport);
    AssetDatabase.I…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by vanifatovvlad
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2 on April 12, 2025 04:19.