Search Issue Tracker

Fixed in Unity 2017.1

Votes

57

Found in

5.6.0f3

Issue ID

897994

Regression

Yes

Enabling Mesh Renderer during rendering causes error in Console tab

Graphics - General

-

-

Priority: 2Necessary for shipping a final release

-

Severity: 3Workaround is possible

Steps to reproduce:

1) Download attached project 'MeshRendererError.zip' and open in Unity
2) Open scene 'ReproScene' and press Play
3) Click on IndividualSoldier gameObject in Hierarchy tab
4) Click on Scene view and press F to focus on that gameObject
5) Check the Console tab and you will see that each frame error will be thrown :
Enabling or adding a Renderer during rendering; this is not allowed. Renderer '2WK_heavy_infantry_06_combat_walk_StaticFromSkinned' will not be added.
UnityEditor.DockArea:OnGUI()

Expected result: No errors in Console tab
Actual result: Error 'Enabling or adding a Renderer during rendering; this is not allowed. Renderer '2WK_heavy_infantry_06_combat_walk_StaticFromSkinned' will not be added.
UnityEditor.DockArea:OnGUI()' when object is visible on the Scene or Game views

Reproduced with:
5.6.0b8, 5.6.0f3, 2017.1.0b1

Not reproduced with:
5.5.3p1, 5.6.0b7

Regression from:
5.6.0b8

-----------------------------
Fixed in: 5.6.2p1, 2017.1.0f1

Comments (11)

  1. 28fbc4438265cbacd7b78b919a9367cf?d=mm

    jongallant

    May 20, 2017 23:40

    Or is there a way for me to get access to TMPro source? Ultimately that would be ideal.

  2. 28fbc4438265cbacd7b78b919a9367cf?d=mm

    jongallant

    May 20, 2017 23:40

    What about those that do not have access to TMPro source? Is there an estimated time for a patch for this for TMPro?

  3. 76a449e5ecb4a21285cde4b41c527068?d=mm

    Stephan-B

    May 10, 2017 21:07

    Any TextMesh Pro users who have access to source code running into this issue can make the following (temporary) changes.

    Make the following changes in the TMP_UpdateManager.cs file at line 47.

    // Change from
    Camera.onPreRender += new Camera.CameraCallback(this.OnCameraPreRender);

    // Change to
    Camera.onPreCull += new Camera.CameraCallback(this.OnCameraPreRender);

    This will shift the generation of the text objects to before the camera is rendered to before culling. As a result, text objects which would not have been generated / updated in the past due to culling (ie. not being visible) will now still be generated.

    This is a temporary fix until the proper fix allowing us to use Camera.onPreRender is available.

    If anyone runs into unforeseen issues with this change, please let me know by posting in either the existing TextMesh Pro Unity forum threads or Unity UI & TextMesh Pro or on the TMP user forum.

  4. Df683d06faa5a85db4526683206caf6a?d=mm

    hadesfury

    May 10, 2017 14:52

    Happening in 5.6.0p4 ... really annoying !

  5. 4142e8e52a2be9965c7509185806ecbc?d=mm

    Iiva

    May 06, 2017 09:50

    this cause huge freeze on iOS

  6. A3d51beb33b43670966b5a0db0958043?d=mm

    IlyaNikitin

    May 05, 2017 07:41

    Now i have the same issue with this too. I'm Enabling/Disabling MeshRenderers through animation. This regression is really frustrating...

  7. 3a97e0f577a72a29118c1de9fb60d5f7?d=mm

    kloogens

    May 02, 2017 14:03

    I'm having this problem with 5.6 and the LODs for my skinned meshes. Worked before, then I "upgraded", now everything is broken. So sick of the constant avalanche of unity bugs.

  8. 1af4b29bcf644c7b9605e705abd71994?d=mm

    Stents

    May 01, 2017 07:45

    "This happens to me using 5.6.0p1 while enabling renderers through the animator in an animation."

    This is also a major issue for us, and is preventing us from updating until it is resolved.

  9. B3308881d63b26310417ac604bf3d8d8?d=mm

    DroidifyDevs

    Apr 19, 2017 15:10

    I can't upgrade my project from 5.5 to 5.6 because of this. I contacted Unity QA via the bug report tool and they haven't been able to give me any workaround for the issue.

  10. 573f0a24dd0632302213c867b3b1b91a?d=mm

    davenirline

    Apr 19, 2017 14:46

    ^ Me too. Also have an animation that activates an object in one of its key frame. Any workaround to this?

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.