Page 1 of 1

Errors in Unity Console when using VN Template

Posted: Sun Jan 14, 2024 9:00 am
by Henkie
Hello There,
When using the VN template Standard dialogue UI it spews alerts in the Unity console. Tried some other templates, they don't seem to have this issue.
I didn't make any changes to it, just selected the template and used it as an instance as shown in the "Dialogue System for Unity 2.x Dialogue UI Tutorial 1"

The following alerts are shown around 12 of them.

Code: Select all

SendMessage cannot be called during Awake, CheckConsistency, or OnValidate (Alert Panel: OnRectTransformDimensionsChange)
UnityEngine.UI.InputField:OnValidate ()
SendMessage cannot be called during Awake, CheckConsistency, or OnValidate (Alert Text: OnRectTransformDimensionsChange)
UnityEngine.UI.InputField:OnValidate ()
SendMessage cannot be called during Awake, CheckConsistency, or OnValidate (Viewport: OnRectTransformDimensionsChange)
UnityEngine.UI.InputField:OnValidate ()
SendMessage cannot be called during Awake, CheckConsistency, or OnValidate (Response Text: OnRectTransformDimensionsChange)
UnityEngine.UI.InputField:OnValidate ()
It works.. but would prefer to go without that many alerts everytime you launch the game.

Re: Errors in Unity Console when using VN Template

Posted: Sun Jan 14, 2024 9:17 am
by Tony Li
Hi,

This is a Unity bug. It results from an internal Unity UI call, not from the Dialogue System itself, in several versions of Unity 2022 and a few other versions. It's harmless but I agree that it's very annoying. You could try backing up your project and updating to a newer Unity version.

(Note: It is possible to generate the same kind of warning by writing code that manipulates Unity UI elements in Awake, CheckConsistency, or OnValidate, but the Dialogue System's code doesn't do that.)

Re: Errors in Unity Console when using VN Template

Posted: Sun Jan 14, 2024 9:53 am
by Henkie
HI Tony,

Thanks for the quick reponse, Updated unity to 2022.3.17f1 (from 2022.3.15f1) didn't seem to resolve the issue. Weird thing is I switched to the WRPG template and it doesn't give these errors.

Re: Errors in Unity Console when using VN Template

Posted: Sun Jan 14, 2024 10:26 am
by Tony Li
The VN Template Standard Dialogue UI has a different set of Unity UI layout elements (Horizontal Layout Group, Content Size Fitter) than the WRPG template. It's those layout elements that are causing the warning.