Page 1 of 1

image profile to large and how to display name

Posted: Wed Mar 02, 2022 6:29 pm
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?




Re: image profile to large and how to display name

Posted: Wed Mar 02, 2022 8:53 pm
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 582 times

Re: image profile to large and how to display name

Posted: Thu Mar 03, 2022 11:12 am
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..

Re: image profile to large and how to display name

Posted: Thu Mar 03, 2022 2:09 pm
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?

Re: image profile to large and how to display name

Posted: Thu Mar 03, 2022 3:12 pm
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






Re: image profile to large and how to display name

Posted: Thu Mar 03, 2022 3:21 pm
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.........

Re: image profile to large and how to display name

Posted: Thu Mar 03, 2022 7:55 pm
by Tony Li
Happy to help!