Page 1 of 2

Fount Change?

Posted: Sun Jan 18, 2015 7:32 am
by midgear
I have two Characters talking, one of them is demon and I want to use a custom fount  when he talks. I looked in the manual and couldn't find anything that would let me do that. Is there some trick to change founts on the fly or am I out of luck?



Fount Change?

Posted: Sun Jan 18, 2015 9:14 am
by Tony Li
Hi,



It's not difficult to do, but it'll require a couple lines of code. What GUI system are you using?

Fount Change?

Posted: Sun Jan 18, 2015 2:47 pm
by midgear
I'm using the "JRPG2 Dialogue UI" Prefab.

Fount Change?

Posted: Sun Jan 18, 2015 3:45 pm
by Tony Li
It was quicker to write the code than describe how to do it, so just import this package. It'll add a new folder named "Custom Actor GUIStyle"containing a new prefab, "Actor Style JRPG2 Dialogue UI". Assign this to your Dialogue Manager instead of the regular JRPG2. (There's a test scene if you want to see it in action. Play the scene and run up to Private Hart. His text will be in a strange red font.)



If you inspect the prefab, you'll see that it has a new section, "Actor Styles". Add as many entries as you want. In each entry, specify the actor's name (e.g., your demon) and GUI Style to use. You need to define this as a custom GUI Style in the GUI Skin "Custom JRPG2 Dialogue GUI Skin" that's in the same folder.

Fount Change?

Posted: Fri Jan 23, 2015 7:27 am
by midgear
There is an odd thing going on, the first time I talk to a character This Happens, but if I talk to them again it's normal.

Fount Change?

Posted: Fri Jan 23, 2015 7:45 am
by Tony Li
Would you please post screenshots of the expanded dialogue UI the Hierarchy view and the UnityDialogueUI script in the Inspector view?

Fount Change?

Posted: Fri Jan 23, 2015 8:09 am
by midgear
Okay:



dialogue UI and the Hierarchy



UnityDialogueUI

Fount Change?

Posted: Fri Jan 23, 2015 8:16 am
by Tony Li
Could you please drag the "Actor Style JRPG2 Dialogue UI" prefab into a temporary scene, fully expand it in the Hierarchy, and post a screenshot of Hierarchy view?



Or, if you prefer, email the UI to tony (at) pixelcrushers.com and I'll check it out in Unity. Right-click on the "Custom Actor GUIStyle" folder in the Project view and select "Export package...". Then untick "Include dependencies" and click the Export... button.

Fount Change?

Posted: Fri Jan 23, 2015 8:21 am
by midgear
Here you go

Fount Change?

Posted: Fri Jan 23, 2015 8:23 am
by Tony Li
Thanks! I'll look into this and get back to you with an answer as soon as I can. (I'm out of the office at the moment.)