Page 1 of 1

Add some UI content to the quest's offerContentList

Posted: Fri Oct 30, 2020 6:04 am
by 0ktun
Image


hi i m using the template "RewardSystemTemplate" and how can i add this UI ?

Re: Add some UI content to the quest's offerContentList

Posted: Fri Oct 30, 2020 8:53 am
by Tony Li
Hi,

I suggest looking at the existing reward systems. For example, the XPRewardSystem (in Plugins / Pixel Crushers / Quest Machine / Scripts / Quest Generator / MonoBehaviours / Reward Systems) has this code:

Code: Select all

            var bodyText = BodyTextQuestContent.CreateInstance<BodyTextQuestContent>();
            bodyText.bodyText = new StringField(xp + " XP");
            quest.offerContentList.Add(bodyText);