private static bool TryGetWebHeaderValue(UnityWebRequest wr, string headerKey, out string headerValue) { #if UNITY_5_4_OR_NEWER headerValue = wr.GetResponseHeader(headerKey); return(string.IsNullOrEmpty(headerValue)); #else if (wr.responseHeaders == null) { headerValue = string.Empty; return(false); } return(wr.responseHeaders.TryGetValue(headerKey, out headerValue)); #endif }