protected void OnDisable() { #if GAME if (!parsedGuid.Equals(System.Guid.Empty)) { WeatherEventListenerManager.removeListener(parsedGuid, this); } #endif }
protected void OnEnable() { #if GAME if (System.Guid.TryParse(WeatherAssetGuid, out parsedGuid)) { WeatherEventListenerManager.addListener(parsedGuid, this); } else { parsedGuid = System.Guid.Empty; UnturnedLog.warn("{0} unable to parse weather asset guid", transform.GetSceneHierarchyPath()); } #endif }