Scene visibility setting in hierarchy not respected by submesh

Sorry for the double post. It doesn’t look like I can delete this?
**I’ve reposted it with the correct tag here: Bug Scene visibility setting in hierarchy not respected by submesh + fix **

Using TextMeshPro 3.0.6, Unity 2021.3.0f1 LTS

Repro steps

  • new scene
  • add textmeshpro object
  • select a non-default font asset
  • set the text input to “<sprite=1>” (so it creates a submesh)
  • set scene visibility to false for entire hierarchy
    8101349--1048631--upload_2022-5-4_15-22-58.png
  • save scene
  • start playing
  • stop playing
  • observe: Submesh now has visibility back on
    8101349--1048634--upload_2022-5-4_15-23-38.png

NB: the exact same issue happens with the selection prevent icon
8101349--1048637--upload_2022-5-4_15-24-4.png

There’s an easy fix actually, but if I do it myself, the packagemanager just throws out the change when it reloads.
There’s no way to make a pull request, is there?

#if UNITY_EDITOR
            var visibilityManager = UnityEditor.SceneVisibilityManager.instance;
            if(visibilityManager.IsHidden(go.transform.parent.gameObject))
            {
                visibilityManager.Hide(go,true);
            }
            if(visibilityManager.IsPickingDisabled(go.transform.parent.gameObject))
            {
                visibilityManager.DisablePicking(go, true);
            }
#endif