Type Load Exception when adding Journal text

Announcements, support questions, and discussion for Quest Machine.
Post Reply
timbecile
Posts: 110
Joined: Mon Mar 12, 2018 11:00 pm

Type Load Exception when adding Journal text

Post by timbecile »

Hey Tony,

I'm trying to add a journal text option to one of my quests, and I'm getting this error:

Code: Select all

ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
System.Reflection.Assembly.GetTypes () (at <437ba245d8404784b9fbab9b439ac908>:0)
PixelCrushers.TypeUtility.GetSubtypes[T] () (at Assets/Plugins/Pixel Crushers/Common/Scripts/Editor/Misc/TypeUtility.cs:32)
PixelCrushers.QuestMachine.QuestEditorUtility.GetSubtypes[T] () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Editor/Quest Editors/Utility/QuestEditorUtility.cs:59)
PixelCrushers.QuestMachine.QuestContentListInspectorGUI.OnAddDropdown (UnityEngine.Rect buttonRect, UnityEditorInternal.ReorderableList list) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Editor/Quest Editors/Quest Inspector/QuestContentListInspectorGUI.cs:102)
UnityEditorInternal.ReorderableList+Defaults.DrawFooter (UnityEngine.Rect rect, UnityEditorInternal.ReorderableList list) (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditorInternal.ReorderableList.DoListFooter (UnityEngine.Rect footerRect) (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditorInternal.ReorderableList.DoLayoutList () (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
PixelCrushers.QuestMachine.QuestContentListInspectorGUI.Draw (UnityEditor.SerializedObject serializedObject, UnityEditor.SerializedProperty contentListProperty, System.Boolean isAsset) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Editor/Quest Editors/Quest Inspector/QuestContentListInspectorGUI.cs:38)
PixelCrushers.QuestMachine.CategorizedQuestContentInspectorGUI.Draw (UnityEditor.SerializedObject serializedObject, UnityEditor.SerializedProperty categorizedContentListProperty) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Editor/Quest Editors/Quest Inspector/CategorizedQuestContentInspectorGUI.cs:45)
PixelCrushers.QuestMachine.QuestStateInfoInspectorGUI.Draw (UnityEditor.SerializedObject serializedObject, UnityEditor.SerializedProperty stateInfoProperty, System.Int32 nodeIndex, PixelCrushers.QuestMachine.QuestState questState) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Editor/Quest Editors/Quest Inspector/QuestStateInfoInspectorGUI.cs:35)
PixelCrushers.QuestMachine.QuestMainInspectorGUI.DrawStateInfo (UnityEditor.SerializedObject serializedObject) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Editor/Quest Editors/Quest Inspector/QuestMainInspectorGUI.cs:199)
PixelCrushers.QuestMachine.QuestMainInspectorGUI.Draw (UnityEditor.SerializedObject serializedObject) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Editor/Quest Editors/Quest Inspector/QuestMainInspectorGUI.cs:38)
PixelCrushers.QuestMachine.QuestInspectorGUI.Draw (UnityEditor.SerializedObject serializedObject) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Editor/Quest Editors/Quest Inspector/QuestInspectorGUI.cs:43)
PixelCrushers.QuestMachine.QuestEditor.OnInspectorGUI () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Editor/Quest Editors/Quest Inspector/QuestEditor.cs:67)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Any thoughts? it was working, and I'm not sure what broke...
User avatar
Tony Li
Posts: 21070
Joined: Thu Jul 18, 2013 1:27 pm

Re: Type Load Exception when adding Journal text

Post by Tony Li »

Hi,

Please try this patch:

PixelCrushers_TypeUtilityPatch_2021-02-22.unitypackage

Your project has an assembly (DLL) that contains a type that can't be loaded. It may be somehow intentionally hiding a type, or the DLL may be corrupt. The patch should allow the Quest Editor to bypass the DLL.
timbecile
Posts: 110
Joined: Mon Mar 12, 2018 11:00 pm

Re: Type Load Exception when adding Journal text

Post by timbecile »

works perfectly!

on an unrelated note, is there a way to trigger a Dialogue system conversation from script?
User avatar
Tony Li
Posts: 21070
Joined: Thu Jul 18, 2013 1:27 pm

Re: Type Load Exception when adding Journal text

Post by Tony Li »

Hi,

Yes: DialogueManager.StartConversation(). There are 4 variations on the parameters. Example:

Code: Select all

DialogueManager.StartConversation("My Conversation", playerTransform, npcTransform);
Post Reply