Browse Source

Fix for using Say() command with empty string.

master
chrisgregan 11 years ago
parent
commit
b18495655f
  1. 7
      Assets/Fungus/Scripts/Dialog.cs

7
Assets/Fungus/Scripts/Dialog.cs

@ -354,6 +354,13 @@ namespace Fungus
public void Say(string _sayText, Action sayAction) public void Say(string _sayText, Action sayAction)
{ {
string subbedText = Game.stringTable.SubstituteStrings(_sayText); string subbedText = Game.stringTable.SubstituteStrings(_sayText);
// Hack: Handle Say(""); by writing a single space character.
if (subbedText.Length == 0)
{
subbedText = " ";
}
continueAction = sayAction; continueAction = sayAction;
previousSayText = subbedText; previousSayText = subbedText;

Loading…
Cancel
Save