Search Issue Tracker

Fixed in 2020.2.X

Fixed in 2019.4.X, 2020.1.X

Votes

1

Found in

2019.4.1f1

2020.1.0a2

2020.2

Issue ID

1263521

Regression

Yes

"SendMessage cannot be called during Awake, CheckConsistency, or OnValidate" thrown when loading UI Asset for the first time

uGUI

-

To reproduce:
1. Open attached project ("case_1263521.zip")
2. From the menu bar select AG Tools > Prefab tester
3. In the opened "Prefab Tester" window click any button
4. Observe the Console window

Expected result: No warnings are thrown
Actual result: "SendMessage cannot be called during Awake, CheckConsistency, or OnValidate" warning is thrown

Reproducible in: 2019.4.1f1, 2019.4.8f1, 2020.1.0a2, 2020.1.2f1, 2020.2.0a20
Not reproducible in: 2018.4.26f1, 2019.4.0f1, 2020.1.0a1

Notes:
1. The issue is only reproducible when loading an asset from the asset database for the first time, so in order to reproduce it again, the project has to be closed and reopened.
2. For issue to reproduce the Asset has to be a nested Prefab.
3. Full warning message:

SendMessage cannot be called during Awake, CheckConsistency, or OnValidate
UnityEditor.AssetDatabase:LoadAssetAtPath<UnityEngine.Object> (string)
PrefabScriptSearch:OnGUI () (at Assets/PrefabScriptSearch.cs:41)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

  1. Response avatar

    Resolution Note (fix version 2020.2):

    Fixed in - 2020.2.0b3

  2. Response avatar

    Resolution Note (fix version 2020.1):

    Fixed in - 2020.1.14f1

  3. Response avatar

    Resolution Note (fix version 2019.4):

    Fixed in 2019.4.16f1

Comments (4)

  1. 7712e78c9707121675f84b312c3199b3?d=mm

    Sliem001

    Feb 08, 2021 10:18

    Still present in 2020.2.3f1

    the bug is not fixed

  2. 9e26d0cd62828a27e22985f0f6c55ded?d=mm

    jashan

    Jan 19, 2021 17:03

    And in Unity 2019.4.18 it's broken again. Filed as
    (Case 1307500) Regression: Warnings SendMessage cannot be called during Awake, CheckConsistency, or OnValidate

  3. 9e26d0cd62828a27e22985f0f6c55ded?d=mm

    jashan

    Nov 22, 2020 11:26

    > Fixed in 2019.4.16f1

    AT LAST! I just updated to 2019.4.15 and once again worked around this by commenting out the offending lines in Scrollbar and Toggle (at least we can edit those files) and am very happy to see that this will apparently be the last time I had to do this ... after having made it a routine for every minor Unity update for the last few months.

  4. E39c4866df6d94c12e2ded466e8417e8?d=mm

    AmitloafTotes

    Oct 07, 2020 09:25

    Will it get solved in 2019.4 LTS? It's really annoying and happens a lot for me

Add comment

Log in to post comment

All about bugs

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