SetPortrait not working when UseDisplayName is checked
SetPortrait not working when UseDisplayName is checked
Hi!
I've run into an issue where the sequencer command SetPortrait doesn't work when Use Display Name is checked.
Fx. I have an actor who is set up as "Paladin" but their display name is "Mark". Whenever I want to use a display name, the portrait doesn't change. I've tried using the method both with the actor name and display name as such:
SetPortrait(Paladin,pic=3);
SetPortrait(Mark,pic=3);
I can't seem to get it to work at all. As long as I don't use a display name, everything works fine. I can't figure out if I'm somehow missing something somewhere?
I've run into an issue where the sequencer command SetPortrait doesn't work when Use Display Name is checked.
Fx. I have an actor who is set up as "Paladin" but their display name is "Mark". Whenever I want to use a display name, the portrait doesn't change. I've tried using the method both with the actor name and display name as such:
SetPortrait(Paladin,pic=3);
SetPortrait(Mark,pic=3);
I can't seem to get it to work at all. As long as I don't use a display name, everything works fine. I can't figure out if I'm somehow missing something somewhere?
Re: SetPortrait not working when UseDisplayName is checked
Hi,
A fix for that is in version 2.2.35, which should be available this week. In the meantime, here's the patch:
DS_SetPortraitPatch_2023-03-15.unitypackage
A fix for that is in version 2.2.35, which should be available this week. In the meantime, here's the patch:
DS_SetPortraitPatch_2023-03-15.unitypackage
Re: SetPortrait not working when UseDisplayName is checked
I downloaded it, but it doesn't seem to have fixed my problem. The portraits still won't change when an actor has a display name.
I dragged and dropped the package into the pixel crusher folder in my project and it seems to have replaced the old sequencer script automatically. Was that not the correct way to do it?
I dragged and dropped the package into the pixel crusher folder in my project and it seems to have replaced the old sequencer script automatically. Was that not the correct way to do it?
Re: SetPortrait not working when UseDisplayName is checked
I think that should have worked. I usually select menu item Assets > Import Package > Custom Package and select the .unitypackage file, but I think dropping the file into the Project view should work, too.
Can you send a reproduction project to tony (at) pixelcrushers.com?
Can you send a reproduction project to tony (at) pixelcrushers.com?
Re: SetPortrait not working when UseDisplayName is checked
I can't send the project because it's for a company I'm interning for. We will try to wait for the update to be pushed and see if the next version update will fix it. Sorry for the inconvenience.
Thank you for your help!
Thank you for your help!
Re: SetPortrait not working when UseDisplayName is checked
Hi again!
Updated to the new version and it still doesn't seem to work for me. Is there any information I can give you that might help to figure out what the issue is?
All my portraits are in "Portrait Sprites" while "Portrait Textures" is empty. I tried putting them into textures as well, but that didn't seem to fix anything.
Here's an example of how I have it set up:
Updated to the new version and it still doesn't seem to work for me. Is there any information I can give you that might help to figure out what the issue is?
All my portraits are in "Portrait Sprites" while "Portrait Textures" is empty. I tried putting them into textures as well, but that didn't seem to fix anything.
Here's an example of how I have it set up:
Re: SetPortrait not working when UseDisplayName is checked
Hi,
Here's an example scene:
DS_SetPortraitTest_2023-03-20.unitypackage
It's DemoScene1, but Private Hart's Display Name is Mark. His second line of dialogue changes his portrait image using SetPortrait(). I assigned Portrait Textures because that's what the original actor uses, but it works the same with Portrait Sprites.
Here's an example scene:
DS_SetPortraitTest_2023-03-20.unitypackage
It's DemoScene1, but Private Hart's Display Name is Mark. His second line of dialogue changes his portrait image using SetPortrait(). I assigned Portrait Textures because that's what the original actor uses, but it works the same with Portrait Sprites.
Re: SetPortrait not working when UseDisplayName is checked
I tried your scene in an older version of our project and it works perfectly. I'm not sure what the problem in my project might be, but if I figure it out I'll let you know.
Re: SetPortrait not working when UseDisplayName is checked
Sounds good. Maybe you have a script with an OnConversationLine() method that changes the portrait, or a subclass of StandardUISubtitlePanel. You could try searching your code for "OnConversationLine" or ": StandardUISubtitlePanel".
Re: SetPortrait not working when UseDisplayName is checked
I figured out what the problem was! It was me.
I completely forgot that the Sequencer is played after the node finished. I only had 2 nodes in my conversation, one for each character, so the portraits never got to change.
My bad! Thank you again for all the help!
I completely forgot that the Sequencer is played after the node finished. I only had 2 nodes in my conversation, one for each character, so the portraits never got to change.
My bad! Thank you again for all the help!