|
|
@ -59,7 +59,21 @@ namespace Fungus |
|
|
|
|
|
|
|
|
|
|
|
protected bool initialized; |
|
|
|
protected bool initialized; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if UNITY_5_4_OR_NEWER |
|
|
|
|
|
|
|
protected virtual void Awake() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
UnityEngine.SceneManagement.SceneManager.activeSceneChanged += (A, B) => { |
|
|
|
|
|
|
|
LevelWasLoaded(); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#else |
|
|
|
public virtual void OnLevelWasLoaded(int level) |
|
|
|
public virtual void OnLevelWasLoaded(int level) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
LevelWasLoaded(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected virtual void LevelWasLoaded() |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Check if a language has been selected using the Set Language command in a previous scene. |
|
|
|
// Check if a language has been selected using the Set Language command in a previous scene. |
|
|
|
if (SetLanguage.mostRecentLanguage != "") |
|
|
|
if (SetLanguage.mostRecentLanguage != "") |
|
|
|