Sorry for bother, I've been trying to do this for the last couple of hours with no luck.
Basically what I want to do is to make the HUD have an animation when a quest changes, or a quest is added. It's simple, like quest description fades out, new quest description fades in.
I tried this example, with no luck. Also tried a new sub-class with this example and doesn't work either (the body text doesn't change)
Ideally I would like to hook the moment a quest is changed, so I can do my animations there. My problem is that, while I can access the quests, I cannot change its contents via code. For example, if I have a quest and press X:
Code: Select all
if (Input.GetKeyDown(KeyCode.X))
{
Quest trackedQuest = QuestMachine.GetQuestJournal().questList.Find(quest => quest.showInTrackHUD);
print(trackedQuest);
var quest_content = trackedQuest.GetContentList(QuestContentCategory.HUD);
print(quest_content);
var content = BodyTextQuestContent.CreateInstance<BodyTextQuestContent>();
content.bodyText = new StringField("Now go find the chest.");
quest_content.Add(content);
QuestMachineMessages.RefreshUIs(this);
}

I am using a subclass of UnityUIQuestHUD. Ideally, I would like to do my animations there.
I am doing something wrong? Thanks so much!