Console warnings when adding new Quest Giver

Announcements, support questions, and discussion for Quest Machine.
Post Reply
mroshaw
Posts: 96
Joined: Wed Jan 19, 2022 4:10 am

Console warnings when adding new Quest Giver

Post by mroshaw »

Hi! I've added a Quest Giver component to one of my NPCs, set the ID and name, and added a couple of Quests. When I enter run mode, I get these warnings in the console:

Code: Select all

CloneList<QuestContent>: Element 0 is null.
Quest Machine: QuestSubasset.CloneList<QuestContent>: Element 0 is null.
Any idea what is causing this?

Full stack trace is as follows:

Code: Select all

CloneList<QuestContent>: Element 0 is null.
UnityEngine.Debug:LogWarning (object)
PixelCrushers.ScriptableObjectUtility:CloneList<PixelCrushers.QuestMachine.QuestContent> (System.Collections.Generic.List`1<PixelCrushers.QuestMachine.QuestContent>) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Misc/ScriptableObjectUtility.cs:74)
PixelCrushers.QuestMachine.QuestSubasset:CloneList<PixelCrushers.QuestMachine.QuestContent> (System.Collections.Generic.List`1<PixelCrushers.QuestMachine.QuestContent>) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Subasset/QuestSubasset.cs:136)
PixelCrushers.QuestMachine.QuestStateInfo:CloneSubassetsInto (PixelCrushers.QuestMachine.QuestStateInfo) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest State/QuestStateInfo.cs:126)
PixelCrushers.QuestMachine.QuestStateInfo:CloneSubassets (System.Collections.Generic.List`1<PixelCrushers.QuestMachine.QuestStateInfo>,System.Collections.Generic.List`1<PixelCrushers.QuestMachine.QuestStateInfo>) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest State/QuestStateInfo.cs:205)
PixelCrushers.QuestMachine.Quest:Clone () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest.cs:614)
PixelCrushers.QuestMachine.QuestListContainer:AddQuest (PixelCrushers.QuestMachine.Quest,bool) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:223)
PixelCrushers.QuestMachine.QuestListContainer:AddQuest (PixelCrushers.QuestMachine.Quest) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:209)
PixelCrushers.QuestMachine.QuestGiver:AddQuest (PixelCrushers.QuestMachine.Quest) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:318)
PixelCrushers.QuestMachine.QuestListContainer:AddQuests (System.Collections.Generic.List`1<PixelCrushers.QuestMachine.Quest>) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:199)
PixelCrushers.QuestMachine.QuestListContainer:InstantiateQuestAssets () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:165)
PixelCrushers.QuestMachine.QuestListContainer:Awake () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:149)
PixelCrushers.QuestMachine.QuestGiver:Awake () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:186)
and:

Code: Select all

Quest Machine: QuestSubasset.CloneList<QuestContent>: Element 0 is null.
UnityEngine.Debug:LogWarning (object)
PixelCrushers.QuestMachine.QuestSubasset:CloneList<PixelCrushers.QuestMachine.QuestContent> (System.Collections.Generic.List`1<PixelCrushers.QuestMachine.QuestContent>) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Subasset/QuestSubasset.cs:145)
PixelCrushers.QuestMachine.QuestStateInfo:CloneSubassetsInto (PixelCrushers.QuestMachine.QuestStateInfo) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest State/QuestStateInfo.cs:126)
PixelCrushers.QuestMachine.QuestStateInfo:CloneSubassets (System.Collections.Generic.List`1<PixelCrushers.QuestMachine.QuestStateInfo>,System.Collections.Generic.List`1<PixelCrushers.QuestMachine.QuestStateInfo>) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest State/QuestStateInfo.cs:205)
PixelCrushers.QuestMachine.Quest:Clone () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest.cs:614)
PixelCrushers.QuestMachine.QuestListContainer:AddQuest (PixelCrushers.QuestMachine.Quest,bool) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:223)
PixelCrushers.QuestMachine.QuestListContainer:AddQuest (PixelCrushers.QuestMachine.Quest) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:209)
PixelCrushers.QuestMachine.QuestGiver:AddQuest (PixelCrushers.QuestMachine.Quest) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:318)
PixelCrushers.QuestMachine.QuestListContainer:AddQuests (System.Collections.Generic.List`1<PixelCrushers.QuestMachine.Quest>) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:199)
PixelCrushers.QuestMachine.QuestListContainer:InstantiateQuestAssets () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:165)
PixelCrushers.QuestMachine.QuestListContainer:Awake () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:149)
PixelCrushers.QuestMachine.QuestGiver:Awake () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:186)
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Console warnings when adding new Quest Giver

Post by Tony Li »

Hi,

Try inspecting the quest in the Quest Editor window. From the gear menu near the upper right, select Debug > Delete Unused Subassets. If that gets rid of the error, please let me know. Unity's Asset Database may have created a gap in one of the quest's content lists.

Also, if you're not on the latest version of Quest Machine, consider backing up your project and then updating to the latest.
mroshaw
Posts: 96
Joined: Wed Jan 19, 2022 4:10 am

Re: Console warnings when adding new Quest Giver

Post by mroshaw »

Thanks Tony!

I tried the "Debug > Delete Unused Subassets" menu on all of my quests. No output on the console, and no change when I enter run mode, unfortunately.

I'm using the latest version of Quest Machine: 1.2.26.

I've picked up Dialog System in the Unity sale (woo hoo!), so it might be a good opportunity for me to start the quests over, and create them with the Dialog system in mind. I only have a few that I'd need to re-do. Unless you can think of anything else simple to try, I'm happy to re-create them.
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Console warnings when adding new Quest Giver

Post by Tony Li »

Thanks for buying the Dialogue System!

The warning should be harmless for now. I'll make sure the next version checks for this issue and handles it automatically.
Post Reply