diff --git a/Assets/Fungus/Scripts/Commands/SavePoint.cs b/Assets/Fungus/Scripts/Commands/SavePoint.cs index e2d4a45f..cf0334e6 100644 --- a/Assets/Fungus/Scripts/Commands/SavePoint.cs +++ b/Assets/Fungus/Scripts/Commands/SavePoint.cs @@ -1,6 +1,8 @@ // This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). // It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) +#if UNITY_5_3_OR_NEWER + using UnityEngine; namespace Fungus @@ -149,4 +151,6 @@ namespace Fungus #endregion } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Components/FungusManager.cs b/Assets/Fungus/Scripts/Components/FungusManager.cs index 7abe71f0..33345f14 100644 --- a/Assets/Fungus/Scripts/Components/FungusManager.cs +++ b/Assets/Fungus/Scripts/Components/FungusManager.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using System.Collections; namespace Fungus @@ -8,7 +11,9 @@ namespace Fungus /// [RequireComponent(typeof(CameraManager))] [RequireComponent(typeof(MusicManager))] + #if UNITY_5_3_OR_NEWER [RequireComponent(typeof(SaveManager))] + #endif public sealed class FungusManager : MonoBehaviour { static FungusManager instance; @@ -19,7 +24,9 @@ namespace Fungus { CameraManager = GetComponent(); MusicManager = GetComponent(); + #if UNITY_5_3_OR_NEWER SaveManager = GetComponent(); + #endif } /// @@ -47,10 +54,12 @@ namespace Fungus /// public MusicManager MusicManager { get; private set; } + #if UNITY_5_3_OR_NEWER /// /// Gets the save manager singleton instance. /// public SaveManager SaveManager { get; private set; } + #endif /// /// Gets the FungusManager singleton instance. diff --git a/Assets/Fungus/Scripts/Components/SaveData.cs b/Assets/Fungus/Scripts/Components/SaveData.cs index 280b8651..0df40cc7 100644 --- a/Assets/Fungus/Scripts/Components/SaveData.cs +++ b/Assets/Fungus/Scripts/Components/SaveData.cs @@ -1,4 +1,9 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +#if UNITY_5_3_OR_NEWER + +using UnityEngine; using System.Collections.Generic; namespace Fungus @@ -62,4 +67,6 @@ namespace Fungus #endregion } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Components/SaveManager.cs b/Assets/Fungus/Scripts/Components/SaveManager.cs index 41fafe76..3c77e00a 100644 --- a/Assets/Fungus/Scripts/Components/SaveManager.cs +++ b/Assets/Fungus/Scripts/Components/SaveManager.cs @@ -1,8 +1,10 @@ // This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). // It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) -using UnityEngine; +#if UNITY_5_3_OR_NEWER + using UnityEngine.SceneManagement; +using UnityEngine; namespace Fungus { @@ -270,4 +272,6 @@ namespace Fungus #endregion } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Components/SaveMenu.cs b/Assets/Fungus/Scripts/Components/SaveMenu.cs index d69f15ae..2640ba18 100644 --- a/Assets/Fungus/Scripts/Components/SaveMenu.cs +++ b/Assets/Fungus/Scripts/Components/SaveMenu.cs @@ -1,4 +1,9 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +#if UNITY_5_3_OR_NEWER + +using UnityEngine; using UnityEngine.UI; using UnityEngine.SceneManagement; @@ -284,4 +289,6 @@ namespace Fungus #endregion } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Editor/SaveDataEditor.cs b/Assets/Fungus/Scripts/Editor/SaveDataEditor.cs index 3c9a7180..4a060e32 100644 --- a/Assets/Fungus/Scripts/Editor/SaveDataEditor.cs +++ b/Assets/Fungus/Scripts/Editor/SaveDataEditor.cs @@ -1,4 +1,9 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +#if UNITY_5_3_OR_NEWER + +using UnityEngine; using UnityEditor; using Rotorz.ReorderableList; @@ -24,4 +29,6 @@ namespace Fungus.EditorUtils serializedObject.ApplyModifiedProperties(); } } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Utils/SaveHistory.cs b/Assets/Fungus/Scripts/Utils/SaveHistory.cs index cd481e5c..a39189bd 100644 --- a/Assets/Fungus/Scripts/Utils/SaveHistory.cs +++ b/Assets/Fungus/Scripts/Utils/SaveHistory.cs @@ -1,6 +1,10 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +#if UNITY_5_3_OR_NEWER + +using UnityEngine; using System.Collections.Generic; -using Fungus; using UnityEngine.SceneManagement; namespace Fungus @@ -124,3 +128,5 @@ namespace Fungus #endregion } } + +#endif \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Utils/SavePointData.cs b/Assets/Fungus/Scripts/Utils/SavePointData.cs index fec9d927..5e63a351 100644 --- a/Assets/Fungus/Scripts/Utils/SavePointData.cs +++ b/Assets/Fungus/Scripts/Utils/SavePointData.cs @@ -1,4 +1,9 @@ -using System.Collections.Generic; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +#if UNITY_5_3_OR_NEWER + +using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.Events; @@ -107,4 +112,6 @@ namespace Fungus #endregion } -} \ No newline at end of file +} + +#endif \ No newline at end of file