Browse Source

Fixed SayDialog not caching all Substitution Handlers when enabled #599

master
Christopher 8 years ago
parent
commit
b4ebe88bb3
  1. 6
      Assets/Fungus/Scripts/Components/SayDialog.cs

6
Assets/Fungus/Scripts/Components/SayDialog.cs

@ -147,10 +147,16 @@ namespace Fungus
// Character image is hidden by default. // Character image is hidden by default.
SetCharacterImage(null); SetCharacterImage(null);
} }
}
protected void OnEnable()
{
// We need to update the cached list every time the Say Dialog is enabled
// due to an initialization order issue after loading scenes.
stringSubstituter.CacheSubstitutionHandlers(); stringSubstituter.CacheSubstitutionHandlers();
} }
protected virtual void LateUpdate() protected virtual void LateUpdate()
{ {
UpdateAlpha(); UpdateAlpha();

Loading…
Cancel
Save