Closed ultrakorne closed 10 months ago
I don't have 2022.2 installed at the moment unfortunately. The error originates from built-in Image component for some reason, it may or may not be an internal Unity bug (happens from time to time). If you open the IngameDebugConsole prefab, make a dummy change and re-save it, does it resolve the issue?
The warning messages are from some Editor code. No matter if we change the IngameDebugConsole prefab (or create a new one), the warnings spam from time to time.
I have encountered the exact same issue too. Are there any chances this is an internal Unity bug?
There is a chance yeah. So far, it did happen numerous times for different plugins of mine. I usually apply a workaround on those Unity versions when applicable but I just haven't installed 2022.2 yet so I can't say if the same can be done for this issue at the moment.
Workaround: https://forum.unity.com/threads/in-game-debug-console-open-source.411323/page-3#post-8920076
tl;dr
Disable Canvas Scaler in the IngameDebugConsole object/prefab and add the following script to it:
using UnityEngine;
using UnityEngine.UI;
[DefaultExecutionOrder(1)]
public class IngameDebugConsoleWarningsWorkaround : MonoBehaviour
{
private void Start()
{
GetComponent<CanvasScaler>().enabled = true;
}
}
Thanks alot for fix, those warnings were driving me crazy.
I've finally applied a simpler built-in solution to this problem. Hopefully the warnings won't show up anymore 🤞
Description of the bug
Warning spam in console about (19 warnings on various objects in the prefab
SendMessage cannot be called during Awake, CheckConsistency, or OnValidate (Image: OnRectTransformDimensionsChange)
Reproduction steps
Have prefab in the scene and start the game
Platform specs
Please provide the following info if this is a Unity 3D repository.
Additional info
Please check Logcat (Android) or Xcode console (iOS) for any meaningful error messages and include them here.