image profile to large and how to display name

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
hrohibil
Posts: 368
Joined: Thu Nov 04, 2021 12:50 pm

image profile to large and how to display name

Post by hrohibil »

hi Toni

Please see attached two images (googledrive).

First one is that in one specific conversation the picture profiles are way to big. They should be like in the second image.
Which leads me to my next question.

How do i add display name above these images/icons?



User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: image profile to large and how to display name

Post by Tony Li »

Hi,

The image size is controlled by Unity UI. Set a size for your dialogue UI's Portrait Image, for example using a Layout Element (see below).

You can also add a Portrait Name and assign it to the subtitle panel's Portrait Name field:

portraitImageName.png
portraitImageName.png (104.18 KiB) Viewed 528 times
hrohibil
Posts: 368
Joined: Thu Nov 04, 2021 12:50 pm

Re: image profile to large and how to display name

Post by hrohibil »

Hi Toni

Still two issues.

The images has correct sizes in all other conversations only in this case with the two NPCs..

I opened the dialogue prefab I am using the circle one, and adjusted the settings like in your image.
But nothings changed, the size is still same on everything..

The other issue with the naming. When I opened the prefab I saw that name GO was greyed out so I enabled it.
Now only above the NPC there is a statement saying (NPC NAME) but in the database under actors I already set all the naming , pictures etc so I was hoping for it to fetch the display name..
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: image profile to large and how to display name

Post by Tony Li »

hrohibil wrote: Thu Mar 03, 2022 11:12 amThe images has correct sizes in all other conversations only in this case with the two NPCs..

I opened the dialogue prefab I am using the circle one, and adjusted the settings like in your image.
But nothings changed, the size is still same on everything..
When this happens in the editor's play mode, inspect the Portrait Image GameObject. Find the settings that make the image the correct size. Make a note of those settings. Then exit play mode and apply those settings to the Portrait Image.
hrohibil wrote: Thu Mar 03, 2022 11:12 amThe other issue with the naming. When I opened the prefab I saw that name GO was greyed out so I enabled it.
Now only above the NPC there is a statement saying (NPC NAME) but in the database under actors I already set all the naming , pictures etc so I was hoping for it to fetch the display name..
Did you assign the (NPC NAME) GameObject to the correct subtitle panel's Portrait Name field?
hrohibil
Posts: 368
Joined: Thu Nov 04, 2021 12:50 pm

Re: image profile to large and how to display name

Post by hrohibil »

Thank you sooooooo much Toni.

Problem # 1 solved

I still only get the (NPC NAME) up above the character.
Please see my settings from provided google drive...

And this is most likely my issue, where is the setting "Did you assign the (NPC NAME) GameObject to the correct subtitle panel's Portrait Name field?"

EDIT:
Is there any chance i can get the dialouge textbox lower down from the NPC as you can see its a little to high

EDIT # 2
I added a third picture of my diaouge prefab in open state. There is already an enabled name object





hrohibil
Posts: 368
Joined: Thu Nov 04, 2021 12:50 pm

Re: image profile to large and how to display name

Post by hrohibil »

It works!!!

Thanks Toni.....

In the prefab, you were right I only saw that the gameobject was enabled but it was no add to the list in the inspector..

Thank you king.........
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: image profile to large and how to display name

Post by Tony Li »

Happy to help!
Post Reply