public static MemoryManager get() { if (_instance == null) { Logger.Log("MemoryManager::get was badly initialized", Logger.Level.WARN); _instance = GameObject.Find(gameObjectName).GetComponent <MemoryManager>(); if (null != _instance) { DontDestroyOnLoad(_instance.gameObject); _instance.initializeIfNecessary(); } else { Logger.Log("MemoryManager::get couldn't find game object", Logger.Level.ERROR); } } return(_instance); }
public static MemoryManager get() { if (_instance == null) { Logger.Log("MemoryManager::get was badly initialized", Logger.Level.WARN); _instance = GameObject.Find(gameObjectName).GetComponent<MemoryManager>(); if (null != _instance) { DontDestroyOnLoad(_instance.gameObject); _instance.initializeIfNecessary(); } else { Logger.Log("MemoryManager::get couldn't find game object", Logger.Level.ERROR); } } return _instance; }