Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

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:
    168
    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:
    168
    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:
    51
    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:
    168
    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.