Portrait Image Moving after first line of text.

Announcements, support questions, and discussion for the Dialogue System.
danieleinseth
Posts: 13
Joined: Mon Feb 16, 2015 10:16 am

Portrait Image Moving after first line of text.

Post by danieleinseth »

Hi







I am having a problem in that after the first dialogue entry in each conversation the portrait Image moves to the top left of the image.



How do I fix this?
User avatar
Tony Li
Posts: 21049
Joined: Thu Jul 18, 2013 1:27 pm

Portrait Image Moving after first line of text.

Post by Tony Li »

Hi Daniel,



Is it the same portrait image GameObject? Could it be that the bottom image is the NPC Portrait Image and the top image is the PC Portrait Image?



Can you post a screenshot of your dialogue UI GameObject hierarchy and the inspector view of the dialogue UI component? Please also feel free to email an example project to tony (at) pixelcrushers.com. I'll be happy to take a look.
danieleinseth
Posts: 13
Joined: Mon Feb 16, 2015 10:16 am

Portrait Image Moving after first line of text.

Post by danieleinseth »

It's the same portrait image GameObject. Both actors use the same GameObject, and the dialogue manager checks to see who is talking.
User avatar
Tony Li
Posts: 21049
Joined: Thu Jul 18, 2013 1:27 pm

Portrait Image Moving after first line of text.

Post by Tony Li »

I'm not sure what's going on. Everything in the screenshot looks like it's set up perfectly. The UI scripts don't do any kind of dynamic readjustment on their own. Is another script perhaps changing the image's scaled rect? Would you please post the inspector view of the portrait image, with the scaled rect section expanded?
danieleinseth
Posts: 13
Joined: Mon Feb 16, 2015 10:16 am

Portrait Image Moving after first line of text.

Post by danieleinseth »

Here you go
User avatar
Tony Li
Posts: 21049
Joined: Thu Jul 18, 2013 1:27 pm

Portrait Image Moving after first line of text.

Post by Tony Li »

That's kind of an unusual scaled rect. If I read it correctly:



The bottom left of the scaled rect is aligned to the bottom left of the screen.

It's offset to the left by 0.7 of the screen width, and down by 0.07 of the screen height. So if the screen is 100x100, the rect is offset (-70,+7).

The size of the rect is 1.8x the screen size. So if the screen is 100x100, the rect is 180x180.



In other words, it looks like the attached image.



What are the sizes of the portrait images?



I can't see the GUI Style Name in the inspector. What GUI style is being used, and what are its settings?



Are you open to adjusting the scaled rect settings? If the portrait images are a fixed size, you can specify width and height in pixels. If you need to scale the position, you can specify the x,y offset in normalized values.
danieleinseth
Posts: 13
Joined: Mon Feb 16, 2015 10:16 am

Portrait Image Moving after first line of text.

Post by danieleinseth »

If you want to I can e-mail you an example project, so you can see. (The first scene of my project should do.)



In that case I need to know what format you preffer, and how to export to that format.
User avatar
Tony Li
Posts: 21049
Joined: Thu Jul 18, 2013 1:27 pm

Portrait Image Moving after first line of text.

Post by Tony Li »

Please export it as a unitypackage. This will keep all the references intact. In the Project view, right-click on the scene and select Export package.... By default, it will pick up all of the dependencies. To make the package smaller, you can deselect the Dialogue System. I'm sure I have a copy of that somewhere. :-)



If it's too big for email, and if you don't have another way of sending me a download link, email me for access to the Pixel Crushers FTP page.
danieleinseth
Posts: 13
Joined: Mon Feb 16, 2015 10:16 am

Portrait Image Moving after first line of text.

Post by danieleinseth »

Sending you a shared link to the Google Drive folder "ExampleProject_danieleinseth" with the example project in it.



File size is 224 MB
User avatar
Tony Li
Posts: 21049
Joined: Thu Jul 18, 2013 1:27 pm

Portrait Image Moving after first line of text.

Post by Tony Li »

I got the link. I'll download it and let you know what I find.
Post Reply