Page 1 of 1

Console warnings when adding new Quest Giver

Posted: Wed Apr 20, 2022 12:24 pm
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)

Re: Console warnings when adding new Quest Giver

Posted: Wed Apr 20, 2022 2:15 pm
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.

Re: Console warnings when adding new Quest Giver

Posted: Thu Apr 21, 2022 1:23 pm
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.

Re: Console warnings when adding new Quest Giver

Posted: Thu Apr 21, 2022 3:39 pm
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.