Search Unity

TMP's submesh causing "Transform child has another parent" on saving prefabs

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by 5argon, May 22, 2019.

  1. 5argon


    Jun 10, 2013
    Screenshot 2019-05-22 21.17.29.png

    I have a pretty deep network of prefabs. Occassionally, I would get into a state in which every save (to make the asterisk on the prefab disappear) will cause these errors. At which point I must hunt down which GameObject is the problem by try deleting things and press save again, from top level, eliminating choices one by one and going in 1 level at a time.

    But in the end I would ended up at the TMP submesh object (that is considerably deep and used by multiple prefabs, probably equal to the amount of Asserting failed shown). Do you have any idea why this could happen? I notice this occur when I do something related to changing fonts, but not consistent enough for a bug report. I guess the outer prefab is also trying to create a new submesh while I change the font around in deeper level, and something conflicted?

    On a related note, do you think that this kind of generated object should have HideFlags.HideAndDontSave ? Maybe it could prevent this kind of problem in the first place.
    Last edited: May 22, 2019
  2. Stephan_B


    Unity Technologies

    Feb 26, 2017
    An issue was uncovered related to the fact the Sub Mesh objects are serialized which was causing issues when Copy / Paste components via the Context Menu.

    This was also adding more noise to source control and since Sub Mesh objects are created as needed, I decided to no longer serialize them.

    These changes will be in version 1.4.2 and 2.0.2.

    In terms of the Hide part, Sub Mesh objects do have some functionality in their inspector so I can't hide them.

    I don't want to rework / potentially get ride of sub mesh objects in terms of objects in the hierarchy but not sure when I'll be able to get to that.

    See if you are able to reproduce this and if so, please provide with the project or a bug report and I can check that against the new release to make sure whatever is causing it is handled.
    5argon likes this.