UI Toolkit PC/NPC panel mixup ?
-
- Posts: 159
- Joined: Mon Nov 23, 2020 6:35 am
UI Toolkit PC/NPC panel mixup ?
I'm setting up Dialogue System with UITK for the first time (always used UGUI previously). It seems to me that it's using the NPC panel also for PC subtitles. I'm using the provided default setup and only added my own styling and changed it from a vertical to a horizontal layout. Here's how it's set up:
And here is how it shows up at runtime: I've double-checked that the player actor (display name "You") has the "isPlayer" checkbox and that the panel assignments in UIToolkitDialogueUI are correct.
The NPC subtitles also show up on the right, and there is never any subtitles in the left box.
And here is how it shows up at runtime: I've double-checked that the player actor (display name "You") has the "isPlayer" checkbox and that the panel assignments in UIToolkitDialogueUI are correct.
The NPC subtitles also show up on the right, and there is never any subtitles in the left box.
Re: UI Toolkit PC/NPC panel mixup ?
Hi,
Make sure you've set the panel indices:
Make sure you've set the panel indices:
-
- Posts: 159
- Joined: Mon Nov 23, 2020 6:35 am
Re: UI Toolkit PC/NPC panel mixup ?
yes, I've done that as well.
-
- Posts: 159
- Joined: Mon Nov 23, 2020 6:35 am
Re: UI Toolkit PC/NPC panel mixup ?
and the UXML should also be fine. As I said: I changed nothing except styling and changing it to horizontal instead of vertical:
I'll hopefully have some time for debugging in the next days. Let's see what's causing this.
I'll hopefully have some time for debugging in the next days. Let's see what's causing this.
Re: UI Toolkit PC/NPC panel mixup ?
Hi,
I confirmed that the basic UI Toolkit dialogue UI uses the correct subtitle panels. As a test, you can assign it to the Dialogue Manager and change the NPC subtitle panel's background to a different color. You should see that NPC lines use the different-colored subtitle panel but player lines don't.
If that doesn't help and debugging doesn't turn up anything, please feel free to send a reproduction project to tony (at) pixelcrushers.com
I confirmed that the basic UI Toolkit dialogue UI uses the correct subtitle panels. As a test, you can assign it to the Dialogue Manager and change the NPC subtitle panel's background to a different color. You should see that NPC lines use the different-colored subtitle panel but player lines don't.
If that doesn't help and debugging doesn't turn up anything, please feel free to send a reproduction project to tony (at) pixelcrushers.com
-
- Posts: 159
- Joined: Mon Nov 23, 2020 6:35 am
Re: UI Toolkit PC/NPC panel mixup ?
Something is off with my setup then. I've assigned the UI document that comes with Dialogue System and I get this:
Which doesn't look right. "You" has taken over both the PC and NPC subtitles.
(there's some USS styling that gets applied, but the UI Document is unchanged, didn't even change the background color)
I'll go digging and let you know what I find. Maybe there's something in my findings that will help others as well. Thanks for your time, the support here is simply amazing for an asset that is very affordable.
Which doesn't look right. "You" has taken over both the PC and NPC subtitles.
(there's some USS styling that gets applied, but the UI Document is unchanged, didn't even change the background color)
I'll go digging and let you know what I find. Maybe there's something in my findings that will help others as well. Thanks for your time, the support here is simply amazing for an asset that is very affordable.
-
- Posts: 159
- Joined: Mon Nov 23, 2020 6:35 am
Re: UI Toolkit PC/NPC panel mixup ?
So I added a bit of debug output here in UIToolkitDialogueUI:
and this is the result: It does mix up the panel assignments somewhere. I've double-checked again and my setup is unchanged from above.
I ended up in UIToolkitDialogueElements and am not sure if line 42 is intentional:
I changed it to
And that appears to solve the issue.
and this is the result: It does mix up the panel assignments somewhere. I've double-checked again and my setup is unchanged from above.
I ended up in UIToolkitDialogueElements and am not sure if line 42 is intentional:
Code: Select all
public override AbstractUISubtitleControls pcSubtitleControls => NPCSubtitleElements;
I changed it to
Code: Select all
public override AbstractUISubtitleControls pcSubtitleControls => PCSubtitleElements;
Re: UI Toolkit PC/NPC panel mixup ?
Thank you! That's definitely a typo and a bug. I'll fix that in the upcoming version 2.2.53.3.