Hey again
Thought I’d drop by and just point out that the original UDE is currently available for free on the asset store, in case you missed the announcement. It is only temporary, though, so if you are curious about the UDEA but want to try before you buy, get the original UDE and try it out for yourself.
Of course, the UDE Advanced wouldn’t deserve the added “Advanced” if it wasn’t a lot more powerful than the UDE so be aware of that little fact. It’s a full dialogue engine with all the bells and whistles, the UDEA is simply far better… plain and simple.
Speaking of better, I thought I’d drop in the current change log for the new UDEA 2.0 which is due to be released soon.
EDIT:Okay, the changelog is a bit long… TLDR version:
- No more OnGUI prefabs included, UGUI all the way now
- Audio system added, including a barking system. I.e. characters can speak random audio at random times
- Created an entirely new keys system that changes the way you work with the kit. It is so much more user friendly than before!!!(Which makes the UDEA2 incompatible with UDEA projects, unfortunately)
- Now includes a Visual Novel prefab. Single drag and drop and you are ready to go.
- Made enabling OnGUI and visual systems compatibility as simple as a single click in the inspector
- Now returns both Texture2D and Sprites for the avatars
- You no longer need to specify if a turn is a choice or not. UDEA2 figures that out automatically
- Removed stuff that was not part of the UDEA: The shop and ActionsHUD
- Demo scenes showcasing multiple input methods: OnTriggerEnter, mouse click
V.2.0
- Added a change log
- Added AutoContinueOnClick boolean to UDEA. Enable to continue the dialogue with a left click
Disable to allow the UDEA to be used with NGUI/ UGUI / etc.
- Added CurrentSprite property alongside CurrentAvatar property. You can now fetch a Sprite or a Texture2D
- WhoIsSpeakingAvatar now first tries to load a Sprite and loads a Texture only if that fails
- Removed the use of the ProcessKeys function to handle custom keys
- Custom keys now directly calls any function you want. The first param of your key is the function name
For example, a custom key "ChangeVolume BGSource 0.4" will send the params "BGSource" and "0.4" to a
function called ChangeVolume
- Custom keys can now have any number of parameters or none at all. If using parameters they will be passed
as a single cmlData object so be sure to create your functions like this: public void FuncX(cmlData data)
- Custom key's parameters can now be prefixed with a descriptive name using the : seperator
Example: [keys] ChangeVolume WhichItem:BGSource Volume:0.4 FadeSpeed:0.15, KeyWithNoParams
Parameters without names are accessed in the order they are declared, ignoring named parameters before it
Paramteres with names are accessed by name and can be converted to it's relevant type
Example: Using key "ChangeVolume BGSource, Volume: 0.4, 0.15" with function: FuncX(cmlData fields)
string bgSource = fields.data[0]; <-- accessed via data array. First entry
float volume = fields.Float("volume"); <-- accessed by name. Converted to type
float fadespeed = float.Parse( fields.data[1] ); <-- second entry in data array. Value returned as string
- Added UGUI display prefabs
- Removed old OnGUI displays and prefabs
- Now require that the dialogue be parented to a canvas, no longer simply run directly on random objects
- Dialogue prefabs are now destroyed instead of disabled so there is now a difference in implementation
- Removed "Parent" property from UDEA class as it was just a duplicate of the public "parent" variable
- Removed redundant OpenFile and StartDialogue methods
- Changed CurrentIsChoice function to look at nuber of redirect values, rather than implicit "choice" value
- Removed the need to add "choice=true" in dialogue scripts. This is now completely redundant
- Made the OnSpeakStart, OnSpeakEnd,OnTypewriterModeUpdate and OnSelectionChange events local events, not static
- Removed the ActionsHUD product from the UDEA. The ActionsHUD is and alwyas was a stanalone product included
for demonstration purposes. It will always be available for free at www.mybadstudios.com if you still want it
- Fixed a bug with WhoIsSpeakingName if called after the dialogue contents were cleared
- Added an Audio system to the UDEA. Just drag the audio prefab onto an object, add some clips to it and you
can now play audio right from your dialogue. Simply add the key "PlaySound track:trackname" where
trackname is the name of a track you added to the prefab. Alternatively you can also use "PlaySound index:x"
where x is the array index of a clip you added to the prefab.
You can also add in "loop:true" or "loop:false" if you want. i.e. "PlaySound track:help loop:false"
- Added a barking system. Use the same audio system and add the sentences you want the character to speak
Simply tick the "random_barks" box and specify the min and max wait time between random barks. Primarily used
to make guards say random stuff, in the demo I use it to play random electrical beeps and crackles on the
damaged robot. Turn this barks system on or off during dialogues using "DisableRandomBarks" or "EnableRandomBarks"
The UDEA2 has UGUI displays by default already making it a worthy upgrade even if only for that reason.
As with the UDEA, the UDEA2 makes it super simple to create you own custom displays so to demonstrate it, here is the code for the main display file used in the screenshots below…:
public class DialogueDisplayMethod1 : DialogueDisplayBase {
public Image
choice_avatar_image;
override public void CheckForChoices(object source, UDEAEvent data)
{
choices_parent.SetActive(CurrentIsChoice);
plain_text_parent.SetActive(!CurrentIsChoice);
if (CurrentIsChoice)
{
choice_avatar_image.sprite = CurrentSprite;
for ( int i = 0; i < choices_text.Length; i++)
{
choices_text[i].text = (i >= CurrentOptionCount) ? string.Empty : CurrentOptions(i);
if (i == Selection)
highlight_image.rectTransform.position = choices_text[i].rectTransform.position - new Vector3(20,0,0);
}
} else
{
actor_name_text.text = WhoIsSpeakingName;
avatar_image.sprite = CurrentSprite;
dialogue_text.text = FormattedText;
}
}
}
That’s it. 30 lines of code for a custom display. Simply derive from the base class and update only what you need to. The rest of the work is done visually in UGUI.
Next big thing to note that that all this time I have been telling people that adding audio to this system is so darn easy that I didn’t even bother to include it in the kit. Instead I just showed those who asked me how to do so. Well, now the kit includes a dedicated audio prefab. Just drag it onto the object, add the clips that objects should be able to speak and you are done. Simply use the new key PlaySound to play it whenever you are ready. No more custom scripting required.
In fact, I even updated the audio system to allow your characters to play random audio clips if you wanted to. Audio, not text. Guards bored on patrol, guys expressing their opinions while playing poker, princess saying cutesy things, whatever… Again, all without a single line of code from you.
This brings me to probably the most important change of all… Those of you who have the UDEA will know that you can trigger external code by just adding a key and then having a function called ProcessKeys that deals with your keys, right? Well that entire system is now gone. In the UDEA2 you can now create your own functions in any script on your object and call them directly from your dialogue. The old limitation that you must have a key name and 2 parameters is no longer present. You can now have 0 to infinite params and you even have the option of assigning your parameters names…
I’m sure that must have raised a few eye brows, huh? 
Anyway, more info as and when… Just wanted to drop by for an update.
Oh, and of course, let’s not forget the fact that the Vikings have finally been retired and the UDEA2 now has a new demo scene using models graciously provided by 3DForge… So here is some screenshots from the GUI created with the code posted above.