Quest Log Settings:
In the “QuestManager.cs/.js” script:
1) Show Quest Log: Tick to enable the quest log.
1) Max Quests: The maximum number of quests that the player can have activated at the same time.
2) Key: The key used to show or hide the quest log UI window.
Quest Log UI Settings:
Add the “QuestLogUI.cs/.js” script in your scene:
1) Canvas: Drag and drop the UI canvas of the quest log panel.
2) Panel: Drag and drop the quest log UI panel. The panel object should include an Image component with the quest log’s backdrop sprite on it. It must also have the Graphics Raycaster component and an Event Trigger. The Event Trigger must include two types of events:
– Begin Drag event: Drag and drop the object that holds the QuestLogUI script and pick “QuestLogUI -> DragStarted()”.
– End Drag event: Drag and drop the object that holds the QuestLogUI script and pick “QuestLogUI -> DragEnded()”.
3) Quest Buttons: Create as many buttons as the maximum number of quests allowed to be active at the same time. Then drag and drop each button object and text object to their respective fields. The quest log will only show as many buttons as active quests. In each button object, add an EventTrigger component. Add this event to the buttons on click: Drag and drop the object that holds the Quest Log UI script and pick “QuestLogUI -> ShowQuestInfo()” .
4) Active Quest: Create an empty UI object and drag it to the Quest Info field. Then create these UI elements as children of the previous object and drag them in their respective fields.
– Quest Giver Image (Image UI object): Will display the active quest giver’s image.
– Quest Giver Name (Text UI object): Will display the name of the active quest giver.
– Quest Title (Text UI object): Will display the title of the active quest.
– Quest Description (Text UI object): Will display the description/story/objectives of the active quest.
– Quest Award Text (Text UI object): Will display the active quest reward for the player.
– Quest Award Image (Image UI object): It will display the icon of the active quest’s reward item. (Works only with S-Inventory, if you don’t have it then simply leave this field empty).
– Abandon Quest (Button UI object): On Click, drag and drop the object that holds the QuestLogUI script and choose “QuestLogUI -> RemoveQuest()”.
5) Default Position: The quest log’s starting position, you have five options: Top-Right corner, Lower-Right corner, Top-Left corner, Lower-Left corner and screen center.
6) Is Movable: Tick this option if you want the player to drag and drop the quest log window in-game and be able to change its position (The position chosen by the player during game play will not be saved, the quest log will always be created in the default position).
7) Drag Panel Slot: To drag the quest log’s panel smoothly, you need to create an empty UI element (contains a Rect Transform only) and make it very small and place it as a child object of the UI canvas then put it in this field.
8) “Close” Button: Create a UI button and make it child of the quest log UI panel object and add this event to the button on click: Drag and drop the object that holds the QuestLogUI script and choose “QuestLogUI -> CloseQuestLog()”.