NPC Portrait Image Behaves Oddly.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
CodePrincess
Posts: 111
Joined: Thu Sep 27, 2018 11:06 pm

NPC Portrait Image Behaves Oddly.

Post by CodePrincess »

Hello, everyone?

Has this ever happened to you?
beforeplay.png
beforeplay.png (240.12 KiB) Viewed 950 times


Things are looking good...
beforetrigger.png
beforetrigger.png (227.69 KiB) Viewed 949 times


Then you trigger a conversation and the NPC portrait image just does this:
aftertrigger.png
aftertrigger.png (235.28 KiB) Viewed 949 times


And once you exit play mode, it acts like nothing happened.

I can't figure out what's going on. Any thoughts would be most helpful.
Take care and thank you for taking the time to read this post!
Thank you so much for your help.

Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
User avatar
Tony Li
Posts: 21059
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC Portrait Image Behaves Oddly.

Post by Tony Li »

Hi,

Have you assigned an image to the NPC actor in your dialogue database? (Remember that the image must be imported as Texture Type = Editor GUI and Legacy GUI.)

If the currently-speaking actor has no image, the dialogue UI will use a blank for the portrait image. That's the white box in your screenshot.

The text "NPC" in your screenshot is from the NPC Portrait Name.

If you don't want to use portrait images, you can remove the NPC Portrait Image and PC Portrait Image GameObjects.
CodePrincess
Posts: 111
Joined: Thu Sep 27, 2018 11:06 pm

Re: NPC Portrait Image Behaves Oddly.

Post by CodePrincess »

Ahh, what a rookie mistake I made. Thank you so much! :D
Thank you so much for your help.

Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
User avatar
Tony Li
Posts: 21059
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC Portrait Image Behaves Oddly.

Post by Tony Li »

Happy to help! The Dialogue System is pretty big, so if any other questions come up, please ask.
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Re: NPC Portrait Image Behaves Oddly.

Post by Alatriste »

Tony Li wrote: Tue Oct 02, 2018 10:25 am Hi,

Have you assigned an image to the NPC actor in your dialogue database? (Remember that the image must be imported as Texture Type = Editor GUI and Legacy GUI.)
Hi Tony,

I usually set up my portraits as sprites. What could be the side effects of doing it this way?

Thanks!
User avatar
Tony Li
Posts: 21059
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC Portrait Image Behaves Oddly.

Post by Tony Li »

Hi,
Alatriste wrote: Wed Oct 03, 2018 5:37 amI usually set up my portraits as sprites. What could be the side effects of doing it this way?
If it works, that's fine. Some dialogue UI systems, such as the legacy GUI system, expect it to be set to Legacy GUI. All of the systems can convert it to Sprite if that's what the system uses. So Legacy GUI guarantees that it will always work with any dialogue UI system.
Post Reply