Page 1 of 1

Adding Icons to Quests

Posted: Sat Dec 04, 2021 12:12 pm
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!

Re: Adding Icons to Quests

Posted: Sat Dec 04, 2021 2:35 pm
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.

Re: Adding Icons to Quests

Posted: Tue Dec 07, 2021 5:44 pm
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 :)