Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Bug Unity 2022 Warning with Canvas Scaler: SendMessage cannot be called during Awake

Discussion in 'UGUI & TextMesh Pro' started by el_Guero, Jun 29, 2023.

  1. el_Guero

    el_Guero

    Joined:
    Sep 15, 2017
    Posts:
    186
    I updated to Unity 2022 and get now ~500 of these warnings:

    SendMessage cannot be called during Awake, CheckConsistency, or OnValidate (MyCanvas: OnRectTransformDimensionsChange)
    UnityEngine.UI.InputField:OnValidate ()

    I get them on canvas objects, images, buttons.

    If I disable the Canvas Scaler component on the canvas gameobject, the warnings are gone. Is this a bug or something I'm doing wrong?
     
    emredesu likes this.
  2. el_Guero

    el_Guero

    Joined:
    Sep 15, 2017
    Posts:
    186
    Update: I realize that this now happens only the first time I enter playmode. Afterwards the warnings are gone. Wasn't the case yesterday... so weird thing to happen.

    edit: the above today is not true anymore. Now they show every time I enter playmode and they now as well show literally for every single UI element I have in the hierarchy. No exception. 999+ warnings when I start to play my game.

    Seems clear that this is a Unity bug but I'm not sure what causes it. Seems I'm the only one with this problem?
     
    Last edited: Jul 1, 2023
  3. emredesu

    emredesu

    Joined:
    Aug 12, 2021
    Posts:
    55
    Nope, not just you. I too just upgraded from 2021 LTS to 2022 LTS and I'm getting these errors as well even though my project uses SendMessage nowhere.
     
    Last edited: Jul 8, 2023
  4. el_Guero

    el_Guero

    Joined:
    Sep 15, 2017
    Posts:
    186
    yeah I reverted back to Unity 2021 (have some other issues with unity 2022 too). But can't work with 999+ warnings in the console. Literally every UI element I have in my hierarchy is triggering this warning. Hilarious.