Errors in Unity Console when using VN Template

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Henkie
Posts: 2
Joined: Sun Jan 14, 2024 8:54 am

Errors in Unity Console when using VN Template

Post 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.
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Errors in Unity Console when using VN Template

Post 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.)
Henkie
Posts: 2
Joined: Sun Jan 14, 2024 8:54 am

Re: Errors in Unity Console when using VN Template

Post 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.
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Errors in Unity Console when using VN Template

Post 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.
Post Reply