why Sorting Order is not batched? (SpriteRenderer & TextMeshPro)

Viewed 10

SpriteRenderer and TextMesh Pro (not UGUI) I am creating a card prefab (3d object) that uses two components. If I create several enter image description here

The materials used for the sprite Renderer are all the same (sharedMaterial is used) The sprites are all in the same atlas. SpriteRenderers are being batched

TextMesh Pro has the same material preset. Even after adding text, the batching works fine (the picture above is that state)

The problem! If i only change the SortingOrder of the TextMeshPro object (as in the picture below)

Batching is not possible and they are classified individually (SpriteRenders have no problem even if they change the sorting order) (Picture below, when the sorting order of TMPs is touched)

enter image description here

I see it in frame debug The blue square is the part that draws the card (SpriteRenderer) The red line is the TextMesh Pro part.

Draw the card frame once, the text of the card, and keep repeating this (as much as the number of cards) x2 batching is happening.. I've been searching for two days and can't find the answer.

Current Status Unity Version 2021.2.16F1 LTS + URP

TMP version is 3.0.6 using addressableAsset

I'm using only one camera, Main.Camera The prefab's z value is currently all 0 (all of its child objects are z == 0)

All sorting layers are using only Default Current sorting by touching only the Order in Layer? (The order in layer is being changed in the script, not the inspector)

Material RenderQueue 2000 geometry used in SpriteRenderers The material used by TMP is 3000 transparent I am using the default shader tmp/mobile/DistanceField in TMP obj (not touched)

enter image description here

GET Material and TMP (Ignore "GetTMPMat")

enter image description here

enter image description here

SpriteRenderer part

enter image description here

TextMeshPro part

0 Answers
Related