Start quest from script
Posted: Mon Oct 19, 2020 5:35 am
Hi,
I'm finally back to using Quest machine, and I'm having some troubles starting a quest from a script.
I'm using Unity 2020.1.4 and the latest Quest machine (downloaded 2020-10-19).
When I run this code, thisQuest is null.
I have a QuestMachine in the scene. The quest i'm trying to load is in a Quest Database, and the database is in the Quest Machine configuration.
Should I be able do this right from the QuestMachine static, or do I need to get a reference of the QuestMachine in the scene? Did I miss any other vital step?
I'm pretty sure this worked before, but it's probably 6-9 months that I worked with it, and things might have changed between different unity and QM versions.
Thank you in advance!
I'm finally back to using Quest machine, and I'm having some troubles starting a quest from a script.
I'm using Unity 2020.1.4 and the latest Quest machine (downloaded 2020-10-19).
When I run this code, thisQuest is null.
Code: Select all
thisQuest = QuestMachine.GetQuestInstance(questReference.id);
thisQuest.SetState(QuestState.Active); // Apparently doesn't work
Should I be able do this right from the QuestMachine static, or do I need to get a reference of the QuestMachine in the scene? Did I miss any other vital step?
I'm pretty sure this worked before, but it's probably 6-9 months that I worked with it, and things might have changed between different unity and QM versions.
Thank you in advance!