Adding Icons to Quests

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
eeeli
Posts: 49
Joined: Tue Oct 05, 2021 4:54 pm

Adding Icons to Quests

Post by eeeli »

Hi Tony,

I'm looking to associate each quest with a corresponding icon in the form of a sprite. I was wondering what the best way to go about doing this would be. I see under "All Fields" in the inspector when selecting a Quest there's an option to add "Files", which I think might be what I'm looking for, but I'm not really sure how to use it.

Thanks so much in advance!
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Adding Icons to Quests

Post by Tony Li »

Hi,

Ignore Files, Pictures, and AudioFiles fields. Those are holdovers from the Dialogue System's roots in an external dialogue editor called Chat Mapper. Chat Mapper uses those fields, but the Dialogue System doesn't.

Instead, if you want to show icons in text (e.g., dialogue or quest log window) you can use TextMesh Pro and add <sprite> tags. More info: TextMesh Pro Support, <sprite> tags.

If you want to associate a sprite with a field in your quest, you can write a custom field type. Internally, field values are strings. But you can store a sprite filename in the string, or even an index into some ScriptableObject asset that holds a list of sprite references. If you need more info on this, let me know.
eeeli
Posts: 49
Joined: Tue Oct 05, 2021 4:54 pm

Re: Adding Icons to Quests

Post by eeeli »

Thank you!

That was exactly what I was looking for. I've started to dig into embedding images into TextMesh Pro and I think I get the hang of it. I appreciate offer for more support, and I'll come back if I run into a wall :)
Post Reply