Browse Source

Disabled SaveManager functionality for older versions of Unity. Works with Unity 5_3_OR_NEWER.

master
Christopher 8 years ago
parent
commit
85634f969a
  1. 4
      Assets/Fungus/Scripts/Commands/SavePoint.cs
  2. 11
      Assets/Fungus/Scripts/Components/FungusManager.cs
  3. 9
      Assets/Fungus/Scripts/Components/SaveData.cs
  4. 6
      Assets/Fungus/Scripts/Components/SaveManager.cs
  5. 9
      Assets/Fungus/Scripts/Components/SaveMenu.cs
  6. 9
      Assets/Fungus/Scripts/Editor/SaveDataEditor.cs
  7. 10
      Assets/Fungus/Scripts/Utils/SaveHistory.cs
  8. 9
      Assets/Fungus/Scripts/Utils/SavePointData.cs

4
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). // 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) // 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;
namespace Fungus namespace Fungus
@ -150,3 +152,5 @@ namespace Fungus
#endregion #endregion
} }
} }
#endif

11
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; using System.Collections;
namespace Fungus namespace Fungus
@ -8,7 +11,9 @@ namespace Fungus
/// </summary> /// </summary>
[RequireComponent(typeof(CameraManager))] [RequireComponent(typeof(CameraManager))]
[RequireComponent(typeof(MusicManager))] [RequireComponent(typeof(MusicManager))]
#if UNITY_5_3_OR_NEWER
[RequireComponent(typeof(SaveManager))] [RequireComponent(typeof(SaveManager))]
#endif
public sealed class FungusManager : MonoBehaviour public sealed class FungusManager : MonoBehaviour
{ {
static FungusManager instance; static FungusManager instance;
@ -19,7 +24,9 @@ namespace Fungus
{ {
CameraManager = GetComponent<CameraManager>(); CameraManager = GetComponent<CameraManager>();
MusicManager = GetComponent<MusicManager>(); MusicManager = GetComponent<MusicManager>();
#if UNITY_5_3_OR_NEWER
SaveManager = GetComponent<SaveManager>(); SaveManager = GetComponent<SaveManager>();
#endif
} }
/// <summary> /// <summary>
@ -47,10 +54,12 @@ namespace Fungus
/// </summary> /// </summary>
public MusicManager MusicManager { get; private set; } public MusicManager MusicManager { get; private set; }
#if UNITY_5_3_OR_NEWER
/// <summary> /// <summary>
/// Gets the save manager singleton instance. /// Gets the save manager singleton instance.
/// </summary> /// </summary>
public SaveManager SaveManager { get; private set; } public SaveManager SaveManager { get; private set; }
#endif
/// <summary> /// <summary>
/// Gets the FungusManager singleton instance. /// Gets the FungusManager singleton instance.

9
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; using System.Collections.Generic;
namespace Fungus namespace Fungus
@ -63,3 +68,5 @@ namespace Fungus
#endregion #endregion
} }
} }
#endif

6
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). // 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) // 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.SceneManagement;
using UnityEngine;
namespace Fungus namespace Fungus
{ {
@ -271,3 +273,5 @@ namespace Fungus
#endregion #endregion
} }
} }
#endif

9
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.UI;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
@ -285,3 +290,5 @@ namespace Fungus
#endregion #endregion
} }
} }
#endif

9
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 UnityEditor;
using Rotorz.ReorderableList; using Rotorz.ReorderableList;
@ -25,3 +30,5 @@ namespace Fungus.EditorUtils
} }
} }
} }
#endif

10
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 System.Collections.Generic;
using Fungus;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
namespace Fungus namespace Fungus
@ -124,3 +128,5 @@ namespace Fungus
#endregion #endregion
} }
} }
#endif

9
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;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
using UnityEngine.Events; using UnityEngine.Events;
@ -108,3 +113,5 @@ namespace Fungus
#endregion #endregion
} }
} }
#endif
Loading…
Cancel
Save