Hi,
Quests can have a "Viewed" field. (The Dialogue System adds the field at runtime if it's not already defined in your quest template.) To show a marker, set the quest's Viewed field to false. You can do this in an OnQuestStateChange() method:
Code: Select all
void OnQuestStateChange(string quest)
{
DialogueLua.SetQuestField(quest, "Viewed", false);
DialogueManager.SendUpdateTracker(); // Update quest log window immediately if it's open.
}
When "Viewed" is missing or false, the quest log window adds text to the end of the quest title:

- newQuestText2.png (291.55 KiB) Viewed 1248 times
When the player clicks on the quest title to view the details, the quest log window automatically sets "Viewed" to false.
You can specify the exact string that it adds in the StandardUIQuestLogWindow component:

- newQuestText1.png (88.8 KiB) Viewed 1248 times
If you want to show an icon in front of the title instead of that text, set the New Quest Text field blank. Then make a subclass of
StandardUIQuestTitleButtonTemplate. Override the
Assign() method to activate an icon Image if the quest hasn't been viewed yet:
Code: Select all
public class MyQuestTitleButtonTemplate : StandardUIQuestTitleButtonTemplate
{
public Image newUpdateIcon; //<--Assign in inspector.
public override void Assign (string questName, string displayName, ToggleChangedDelegate trackToggleDelegate)
{
base.Assign(questName, displayName, trackToggleDelegate);
newUpdateIcon.enabbled != QuestLog.WasQuestViewed(title);
}
}
Use the subclass on your quest log window's Active Quest Heading Template instead of the original class.