private void OnDestroy() { if (!(instance != this)) { instance = null; } }
private void Awake() { if (instance != null) { Log.Error("Another instance exist", 25, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Demo\\Code\\InactivityHandler.cs"); } else { instance = this; } }