Purpose: Main quest manager (Singleton). Stores the state of all accepted, failed, and completed quests. Automatically saves progress to SaveProvider. Handles quest acceptance logic (with condition checking) and tracks objective completion.
- Add
Add Component > Neoxider > Quest > QuestManagerto a global scene object. - Drag all available
QuestConfigs into the_knownQuestsarray. This acts as the database the manager uses to look up quests by ID. - Ensure
_autoSaveand_autoLoadare checked.
| Field | Description |
|---|---|
_conditionContext |
The GameObject (usually the player) passed to ConditionEntry for evaluations. For example, to check the player's level before granting a quest. |
_knownQuests |
Database of all existing quests. |
_saveKey |
The key used in SaveProvider to save progress. |
_autoSave, _autoLoad |
Automatically save/load the quest list. |
Events (_onQuestAccepted, etc.) |
Unity Events you can bind UI to (e.g., to show a "Quest Updated" popup). |
// Accept a quest by ID (returns false if conditions aren't met or already accepted)
bool success = QuestManager.I.AcceptQuest("kill_boars");
// Complete the first objective (index 0) of a quest
QuestManager.I.CompleteObjective("kill_boars", 0);
// If the objective is KillCount: notify the manager an enemy 'boar' was killed.
// The manager will automatically find quests needing this mob and add +1.
QuestManager.I.NotifyKill("boar");
// Fail a quest
QuestManager.I.FailQuest("escort_npc");- QuestConfig
- QuestState - how progress is stored.
- Module Root