From 2021 to 2022, Errors and Upgrade

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Danzer
Posts: 4
Joined: Wed Apr 21, 2021 5:49 am

From 2021 to 2022, Errors and Upgrade

Post by Danzer »

Hi,

I'm updating a project originally created in Unity 2021 to the latest LTS version of Unity 2022.
In this project, I'm using version 2.2.15 of Dialogue System. I'm encountering some console errors related to DS, such as:

Code: Select all

ArgumentException: You can only call GUI functions from inside OnGUI.
UnityEngine.GUIUtility.CheckOnGUI () (at <738dfc017b6f49678c748c0a004fcafe>:0)
UnityEngine.GUI.get_skin () (at <738dfc017b6f49678c748c0a004fcafe>:0)
PixelCrushers.HelpBoxAttributeDrawer.GetHeight () (at Assets/Plugins/Pixel Crushers/Common/Scripts/Editor/Misc/HelpBoxAttributeDrawer.cs:18)
UnityEditor.UIElements.PropertyField.ResetDecoratorDrawers (UnityEditor.PropertyHandler handler) (at <4b8f645257c94d1296f440a10c6f388e>:0)
UnityEditor.UIElements.PropertyField.Reset (UnityEditor.SerializedProperty newProperty) (at <4b8f645257c94d1296f440a10c6f388e>:0)
UnityEditor.UIElements.PropertyField.Reset (UnityEditor.UIElements.SerializedPropertyBindEvent evt) (at <4b8f645257c94d1296f440a10c6f388e>:0)
UnityEditor.UIElements.PropertyField.ExecuteDefaultActionAtTarget (UnityEngine.UIElements.EventBase evt) (at <4b8f645257c94d1296f440a10c6f388e>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <886395f7f3c74189a56ab6a83f489872>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase evt) (at <886395f7f3c74189a56ab6a83f489872>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <886395f7f3c74189a56ab6a83f489872>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetAndDefaultPhase (UnityEngine.UIElements.EventBase evt) (at <886395f7f3c74189a56ab6a83f489872>:0)
UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.SendBindingEvent[TEventType] (TEventType evt, UnityEngine.UIElements.VisualElement target) (at <b54ef8ca9c3e48ce9da615ccc27b9784>:0)
UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.BindPropertyRelative (UnityEngine.UIElements.IBindable field, UnityEditor.SerializedProperty parentProperty) (at <b54ef8ca9c3e48ce9da615ccc27b9784>:0)
UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.BindTree (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <b54ef8ca9c3e48ce9da615ccc27b9784>:0)
UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.BindTree (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <b54ef8ca9c3e48ce9da615ccc27b9784>:0)
UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.BindTree (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <b54ef8ca9c3e48ce9da615ccc27b9784>:0)
UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.ContinueBinding (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <b54ef8ca9c3e48ce9da615ccc27b9784>:0)
UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.Bind (UnityEngine.UIElements.VisualElement element) (at <b54ef8ca9c3e48ce9da615ccc27b9784>:0)
UnityEditor.UIElements.Bindings.DefaultSerializedObjectBindingImplementation.Bind (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedObject obj) (at <b54ef8ca9c3e48ce9da615ccc27b9784>:0)
UnityEditor.UIElements.BindingExtensions.Bind (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedObject obj) (at <4b8f645257c94d1296f440a10c6f388e>:0)
UnityEditor.UIElements.InspectorElement..ctor (UnityEditor.SerializedObject obj, UnityEditor.Editor editor, UnityEditor.UIElements.InspectorElement+DefaultInspectorFramework defaultInspectorFramework) (at <4b8f645257c94d1296f440a10c6f388e>:0)
UnityEditor.UIElements.InspectorElement..ctor (UnityEditor.Editor editor, UnityEditor.UIElements.InspectorElement+DefaultInspectorFramework defaultInspectorFramework) (at <4b8f645257c94d1296f440a10c6f388e>:0)
UnityEditor.UIElements.InspectorElement..ctor (UnityEditor.Editor editor) (at <4b8f645257c94d1296f440a10c6f388e>:0)
UnityEditor.UIElements.EditorElement.BuildInspectorElement () (at <4b8f645257c94d1296f440a10c6f388e>:0)
UnityEditor.UIElements.EditorElement.CreateInspectorElement () (at <4b8f645257c94d1296f440a10c6f388e>:0)
UnityEditor.EditorElementUpdater.CreateInspectorElementsForMilliseconds (System.Int64 targetMilliseconds) (at <4b8f645257c94d1296f440a10c6f388e>:0)
UnityEditor.PropertyEditor.Update () (at <4b8f645257c94d1296f440a10c6f388e>:0)
UnityEditor.HostView.SendUpdate () (at <4b8f645257c94d1296f440a10c6f388e>:0)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <4b8f645257c94d1296f440a10c6f388e>:0)
In addition to asking for help with resolving this specific error, I'd also like to know whether it's necessary to update DS to a newer version, or if I can manage with this one.
I'm using some customized prefabs for DS dialogues (mainly UI), so deleting the entire Pixel Crushers folder and reinstalling everything from scratch would be problematic.
User avatar
Tony Li
Posts: 23278
Joined: Thu Jul 18, 2013 1:27 pm

Re: From 2021 to 2022, Errors and Upgrade

Post by Tony Li »

Hi,

Unity 2022 changed so that it uses UI Toolkit for its default editor drawing, which -- unlike Unity 2021 and older -- has some extra restrictions. A DS version after 2.2.15 accommodates these restrictions.

The simplest solution is probably:

1. Back up your project. Make sure the backup is good.
2. Import DS version 2.2.54, but UNtick the Prefabs folder so you don't overwrite your customized prefabs.

That should work without any issues.

Assuming that works, duplicate your prefabs, assign the duplicates to the relevant fields (e.g., assign the duplicate to the Dialogue Manager's Display Settings > Dialogue UI field), and move the duplicates to your own folder. This way you can update the Dialogue System in the future without having to worry about overwriting anything.

Then please review the Release Notes. If you don't want to read through the whole thing, you can search for "changed:". Some important changes to note:

2.2.40: CHANGED: If using Unity navmesh navigation, you must now enable integration by ticking USE_NAVMESH in Welcome Window or menu item Tools > Pixel Crushers > Common > Misc > Use NavMesh.

2.2.31: CHANGED: Entrytag Format dropdown value for Custom changed. If your existing project has previously set Entrytag Format to Custom, you must set it again.

2.2.16: CHANGED: StandardUIResponseButton.OnClick no longer adds click event at runtime if another event is already assigned. If you've assigned something to the Button's OnClick() event, also assign StandardUIResponseButton.OnClick.
Post Reply