This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections.Generic; | |
/// <summary> | |
/// PlayerPrefsExtra gives you more possibilities like saving complex types | |
/// Vectors, Colors, Quaternions, Lists and Your Pre defined types (Objects, Classes or Structs). | |
/// | |
/// Developed by Hamza Herbou | |
/// Email : hamza95herbou@gmail.com | |
/// GitHub : https://github.com/herbou/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class Singleton<T> : MonoBehaviour where T : MonoBehaviour { | |
// Check to see if we're about to be destroyed. | |
private static bool _ShuttingDown = false; | |
private static object _Lock = new object(); | |
private static T _Instance; | |
/// <summary> | |
/// Access singleton instance through this propriety. |