PixelCrushers.DialogueSystem.UnityUIQuestTracker Class Reference

When you attach this script to the Dialogue Manager object (or a child), it will display tracked quests using the new Unity UI. More...

Inheritance diagram for PixelCrushers.DialogueSystem.UnityUIQuestTracker:
Collaboration diagram for PixelCrushers.DialogueSystem.UnityUIQuestTracker:

Public Types

enum  QuestDescriptionSource { QuestDescriptionSource.Title, QuestDescriptionSource.Description }
 

Public Member Functions

virtual void Start ()
 Wait 0.5s to update the tracker in case other start methods change the state of quests. More...
 
virtual void ShowTracker ()
 Shows the quest tracker HUD. More...
 
virtual void HideTracker ()
 Hides the quest tracker HUD entirely. More...
 
virtual void ToggleTracker ()
 Toggles the quest tracker HUD visibility. More...
 
virtual void OnQuestTrackingEnabled (string quest)
 The quest log window sends this message when the player toggles tracking. More...
 
virtual void OnQuestTrackingDisabled (string quest)
 The quest log window sends this message when the player toggles tracking. More...
 
void OnConversationEnd (Transform actor)
 Quests are often completed in conversations. More...
 
virtual void UpdateTracker ()
 

Public Attributes

string playerPrefsToggleKey = "QuestTracker"
 
Transform container
 The UI control that will hold quest track info (instantiated copies of the quest track template). More...
 
bool showContainerIfEmpty = true
 Tick to show the container even if there's nothing to track. More...
 
UnityUIQuestTrackTemplate questTrackTemplate
 The quest track template. More...
 
bool showActiveQuests = true
 Tick to show active quests in the tracker. More...
 
bool showCompletedQuests = false
 Tick to show successful and failed quests in the tracker. More...
 
bool showCompletedEntryText = false
 Tick to look up "Entry n Success" or "Entry n Failure" if the quest entry is in the success or failure state. More...
 
QuestDescriptionSource questDescriptionSource = QuestDescriptionSource.Title
 
bool visibleOnStart = true
 

Protected Member Functions

virtual IEnumerator RefreshAtEndOfFrame ()
 
virtual void AddQuestTrack (string quest)
 
virtual string GetQuestEntryText (string quest, int entryNum, QuestState entryState)
 

Protected Attributes

List< UnityUIQuestTrackTemplateinstantiatedItems = new List<UnityUIQuestTrackTemplate>()
 
bool isVisible = true
 
Coroutine refreshCoroutine = null
 

Detailed Description

When you attach this script to the Dialogue Manager object (or a child), it will display tracked quests using the new Unity UI.

It updates when the player toggles tracking in the quest log window and at the end of conversations. If you change the state of a quest elsewhere, you must manually call UpdateTracker().

Member Enumeration Documentation

◆ QuestDescriptionSource

Member Function Documentation

◆ AddQuestTrack()

virtual void PixelCrushers.DialogueSystem.UnityUIQuestTracker.AddQuestTrack ( string  quest)
protectedvirtual

◆ GetQuestEntryText()

virtual string PixelCrushers.DialogueSystem.UnityUIQuestTracker.GetQuestEntryText ( string  quest,
int  entryNum,
QuestState  entryState 
)
protectedvirtual

◆ HideTracker()

virtual void PixelCrushers.DialogueSystem.UnityUIQuestTracker.HideTracker ( )
virtual

Hides the quest tracker HUD entirely.

◆ OnConversationEnd()

void PixelCrushers.DialogueSystem.UnityUIQuestTracker.OnConversationEnd ( Transform  actor)

Quests are often completed in conversations.

This handles changes in quest states after conversations.

Parameters
actorActor.

◆ OnQuestTrackingDisabled()

virtual void PixelCrushers.DialogueSystem.UnityUIQuestTracker.OnQuestTrackingDisabled ( string  quest)
virtual

The quest log window sends this message when the player toggles tracking.

Parameters
questQuest.

◆ OnQuestTrackingEnabled()

virtual void PixelCrushers.DialogueSystem.UnityUIQuestTracker.OnQuestTrackingEnabled ( string  quest)
virtual

The quest log window sends this message when the player toggles tracking.

Parameters
questQuest.

◆ RefreshAtEndOfFrame()

virtual IEnumerator PixelCrushers.DialogueSystem.UnityUIQuestTracker.RefreshAtEndOfFrame ( )
protectedvirtual

◆ ShowTracker()

virtual void PixelCrushers.DialogueSystem.UnityUIQuestTracker.ShowTracker ( )
virtual

Shows the quest tracker HUD.

◆ Start()

virtual void PixelCrushers.DialogueSystem.UnityUIQuestTracker.Start ( )
virtual

Wait 0.5s to update the tracker in case other start methods change the state of quests.

◆ ToggleTracker()

virtual void PixelCrushers.DialogueSystem.UnityUIQuestTracker.ToggleTracker ( )
virtual

Toggles the quest tracker HUD visibility.

◆ UpdateTracker()

virtual void PixelCrushers.DialogueSystem.UnityUIQuestTracker.UpdateTracker ( )
virtual

Member Data Documentation

◆ container

Transform PixelCrushers.DialogueSystem.UnityUIQuestTracker.container

The UI control that will hold quest track info (instantiated copies of the quest track template).

This is typically a Vertical Layout Group.

◆ instantiatedItems

List<UnityUIQuestTrackTemplate> PixelCrushers.DialogueSystem.UnityUIQuestTracker.instantiatedItems = new List<UnityUIQuestTrackTemplate>()
protected

◆ isVisible

bool PixelCrushers.DialogueSystem.UnityUIQuestTracker.isVisible = true
protected

◆ playerPrefsToggleKey

string PixelCrushers.DialogueSystem.UnityUIQuestTracker.playerPrefsToggleKey = "QuestTracker"

◆ questDescriptionSource

QuestDescriptionSource PixelCrushers.DialogueSystem.UnityUIQuestTracker.questDescriptionSource = QuestDescriptionSource.Title

◆ questTrackTemplate

UnityUIQuestTrackTemplate PixelCrushers.DialogueSystem.UnityUIQuestTracker.questTrackTemplate

The quest track template.

◆ refreshCoroutine

Coroutine PixelCrushers.DialogueSystem.UnityUIQuestTracker.refreshCoroutine = null
protected

◆ showActiveQuests

bool PixelCrushers.DialogueSystem.UnityUIQuestTracker.showActiveQuests = true

Tick to show active quests in the tracker.

◆ showCompletedEntryText

bool PixelCrushers.DialogueSystem.UnityUIQuestTracker.showCompletedEntryText = false

Tick to look up "Entry n Success" or "Entry n Failure" if the quest entry is in the success or failure state.

◆ showCompletedQuests

bool PixelCrushers.DialogueSystem.UnityUIQuestTracker.showCompletedQuests = false

Tick to show successful and failed quests in the tracker.

◆ showContainerIfEmpty

bool PixelCrushers.DialogueSystem.UnityUIQuestTracker.showContainerIfEmpty = true

Tick to show the container even if there's nothing to track.

◆ visibleOnStart

bool PixelCrushers.DialogueSystem.UnityUIQuestTracker.visibleOnStart = true

The documentation for this class was generated from the following file: