Manager
Overview
UCQuestManager is a UGameInstanceSubsystem that manages quest creation, activation, and step processing. It implements ICQuestMaker and ICPipeline, and registers itself as a singleton (CNAME_Singleton_QuestManager) on initialization.
Functions
| Name | Description |
|---|---|
| getInstance | Static helper returning the UCQuestManager from a given actor’s game instance |
| createQuest | Stores a quest map, assigns quest/step IDs, and sets the first step as active (BlueprintCallable) |
| clearAll | Empties the entire quest map (BlueprintCallable) |
| activateAnyQuest | Evaluates condition delegates on all UNSET quests and activates those that pass |
| proceedWithActorQuestAction | Processes an actor-based quest action for all active quests matching the initiator |
| proceedWithRoomQuestAction | Processes a room-based quest action for all active quests matching the initiator |
// getInstance — static access from any actor
UCQuestManager* mgr = UCQuestManager::getInstance(myActor);
// createQuest — register quests from a TMap
TMap<FName, FCQuestStruct> questMap;
// ... populate questMap ...
mgr->createQuest(questMap);
// clearAll — remove all quests
mgr->clearAll();
// proceedWithActorQuestAction — called internally when an actor interaction occurs
// returns true if at least one step delegate was bound and executed
bool handled = mgr->proceedWithActorQuestAction(sourceActor, otherActor, FName("NpcTag"));
// proceedWithRoomQuestAction — called internally when a room interaction occurs
bool handled = mgr->proceedWithRoomQuestAction(roomQuestContainer, otherActor, FName("RoomTag"));QuestUtility
Static utility class providing global quest action dispatch without direct manager access. Uses ICQuestMaker singleton lookup.
| Name | Description |
|---|---|
| proceedWithQuestAction (actor) | Retrieves the ICQuestMaker singleton and delegates proceedWithActorQuestAction |
| proceedWithQuestAction (room) | Retrieves the ICQuestMaker singleton and delegates proceedWithRoomQuestAction |
// QuestUtility — dispatch actor quest action from anywhere
bool ok = QuestUtility::proceedWithQuestAction(sourceActor, otherActor, FName("NpcTag"));
// QuestUtility — dispatch room quest action from anywhere
bool ok = QuestUtility::proceedWithQuestAction(roomQuestContainer, otherActor, FName("RoomTag"));