Toggle Portrait on/off

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
HawkX
Posts: 147
Joined: Mon Feb 27, 2017 1:50 pm
Location: Quebec
Contact:

Toggle Portrait on/off

Post by HawkX »

Hi Tony!

Every week I hope I wont have to bother you again with something else that halt my progress... and every time i fail :P

I am trying to toggle off the portrait for 1 specific conversation...
I am using a heavily modified "JRPG prefab" and i'd like to have one chain of conversation be without portrait visible...

Any suggestion? :)
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: Toggle Portrait on/off

Post by Tony Li »

Hi!

Can you make a copy of your modified JRPG prefab and use it only for that 1 specific conversation? In the copy, deactivate the portrait image and/or name, and unassign it from the Unity UI Dialogue UI fields. (For example, leave Dialogue > NPC Subtitle > Portrait Image and Portrait Name unassigned.)

Then add an Override Dialogue UI component to the GameObject involved in that conversation, and assign the copy to it.
User avatar
HawkX
Posts: 147
Joined: Mon Feb 27, 2017 1:50 pm
Location: Quebec
Contact:

Re: Toggle Portrait on/off

Post by HawkX »

Sorry for not writing back sooner, I am super busy seeing as we have a huge meeting next friday (on the 31st)...

I tried what you wrote... but ran into a problem eventually because when the override took place, it did not add a new canvas and did not put the prefab in the existing canvas either... so nothing was being displayed... i tried making the prefab to have the canvas in as well, but that didnt work somehow...

ANYWAY it doesnt really matter as I found another super easy solution... created a new actor (same name, same everything) but with a 10x10 alpha channel empty png as its portrait texture... that worked perfectly for what i needed! :)

I am currently building an option menu and trying a few things with "DisplaySettings"... if i dont figure it out in a few hours I might make a new thread about that :P lol... but I still wanted to say thanks for your input as always on this one! :)
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: Toggle Portrait on/off

Post by Tony Li »

Happy to help! Nice solution. Creating an actor with an invisible portrait is so much simpler than what I suggested.
Post Reply