Page 1 of 2
Portrait Image Moving after first line of text.
Posted: Wed Feb 25, 2015 3:08 am
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?
Portrait Image Moving after first line of text.
Posted: Wed Feb 25, 2015 3:27 am
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.
Portrait Image Moving after first line of text.
Posted: Wed Feb 25, 2015 4:01 am
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.
Portrait Image Moving after first line of text.
Posted: Wed Feb 25, 2015 4:13 am
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?
Portrait Image Moving after first line of text.
Posted: Wed Feb 25, 2015 4:21 am
by danieleinseth
Here you go
Portrait Image Moving after first line of text.
Posted: Wed Feb 25, 2015 4:52 am
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.
Portrait Image Moving after first line of text.
Posted: Wed Feb 25, 2015 5:18 am
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.
Portrait Image Moving after first line of text.
Posted: Wed Feb 25, 2015 5:40 am
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.
Portrait Image Moving after first line of text.
Posted: Wed Feb 25, 2015 6:18 am
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
Portrait Image Moving after first line of text.
Posted: Wed Feb 25, 2015 8:02 am
by Tony Li
I got the link. I'll download it and let you know what I find.