Browse Source

Fixed string serialisation bug

master
chrisgregan 9 years ago
parent
commit
6a486a37fa
  1. 4
      Assets/Fungus/Flowchart/Scripts/Commands/LoadScene.cs
  2. 8
      Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs
  3. 4
      Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs

4
Assets/Fungus/Flowchart/Scripts/Commands/LoadScene.cs

@ -49,10 +49,10 @@ namespace Fungus
public virtual void OnAfterDeserialize() public virtual void OnAfterDeserialize()
{ {
if (sceneNameOLD != default(string)) if (sceneNameOLD != "")
{ {
_sceneName.Value = sceneNameOLD; _sceneName.Value = sceneNameOLD;
sceneNameOLD = default(string); sceneNameOLD = "";
} }
} }

8
Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs

@ -46,7 +46,7 @@ namespace Fungus
{ {
foreach (MessageReceived receiver in receivers) foreach (MessageReceived receiver in receivers)
{ {
receiver.OnSendFungusMessage(_message); receiver.OnSendFungusMessage(_message.Value);
} }
} }
@ -60,7 +60,7 @@ namespace Fungus
return "Error: No message specified"; return "Error: No message specified";
} }
return _message; return _message.Value;
} }
public override Color GetButtonColor() public override Color GetButtonColor()
@ -77,10 +77,10 @@ namespace Fungus
public virtual void OnAfterDeserialize() public virtual void OnAfterDeserialize()
{ {
if (messageOLD != default(string)) if (messageOLD != "")
{ {
_message.Value = messageOLD; _message.Value = messageOLD;
messageOLD = default(string); messageOLD = "";
} }
} }

4
Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs

@ -49,10 +49,10 @@ namespace Fungus
public virtual void OnAfterDeserialize() public virtual void OnAfterDeserialize()
{ {
if (languageCodeOLD != default(string)) if (languageCodeOLD != "")
{ {
_languageCode.Value = languageCodeOLD; _languageCode.Value = languageCodeOLD;
languageCodeOLD = default(string); languageCodeOLD = "";
} }
} }

Loading…
Cancel
Save