Browse Source

Attempt to use any dialog if none currently set

master
chrisgregan 10 years ago
parent
commit
d34d206ff0
  1. 9
      Assets/Fungus/Dialog/Commands/Choose.cs
  2. 9
      Assets/Fungus/Dialog/Commands/Say.cs

9
Assets/Fungus/Dialog/Commands/Choose.cs

@ -33,8 +33,13 @@ namespace Fungus
showBasicGUI = false;
if (dialog == null)
{
showBasicGUI = true;
return;
// Try to get any SayDialog in the scene
dialog = GameObject.FindObjectOfType<ChooseDialog>();
if (dialog == null)
{
showBasicGUI = true;
return;
}
}
if (options.Count == 0)

9
Assets/Fungus/Dialog/Commands/Say.cs

@ -33,8 +33,13 @@ namespace Fungus
showBasicGUI = false;
if (dialog == null)
{
showBasicGUI = true;
return;
// Try to get any SayDialog in the scene
dialog = GameObject.FindObjectOfType<SayDialog>();
if (dialog == null)
{
showBasicGUI = true;
return;
}
}
dialog.SetCharacter(character);

Loading…
Cancel
Save