cocos-engine icon indicating copy to clipboard operation
cocos-engine copied to clipboard

RichText重新排版里面的LABEL没有继承RICHTEXT的SORTING2D属性

Open 104122418 opened this issue 5 months ago • 5 comments

Cocos Creator version

3.8.7

System information

all

Issue description

RichText重新排版里面的LABEL没有继承RICHTEXT的SORTING2D属性

Relevant error log output

No response

Steps to reproduce

RichText重新排版里面的LABEL没有继承RICHTEXT的SORTING2D属性

Minimal reproduction project

No response

104122418 avatar Sep 18 '25 11:09 104122418

Looks like the segments created with various components in the rich text component code do not get the Sorting2D component from their parent (the richtText component node). This makes the generated rich text component render at the default sorting index instead of the one configured in the editor. My guess is that the Sorting2d component should get added if necessary maybe in getSegmentByPool

raduangelescu avatar Nov 10 '25 16:11 raduangelescu

你说的重新排版,是什么意思?

tangkaikk avatar Nov 21 '25 06:11 tangkaikk

Added the pull request with the fix so it's more clear what I mean. (I think stuff is getting lost in translation as I don't speak chineese and the google translate version doesn't make sense).

raduangelescu avatar Nov 21 '25 09:11 raduangelescu

Could you please provide the demo for me to check?

tangkaikk avatar Nov 24 '25 03:11 tangkaikk

Here you go: richtextbadlayer_example.zip

Note that there are further details in my pull request: https://github.com/cocos/cocos-engine/pull/19084

raduangelescu avatar Nov 24 '25 18:11 raduangelescu