public static bool IsProd() { if (Developers.Enabled) { return(false); } if (!StencilFirebase.IsReady) { if (!_hasLogged) { _hasLogged = true; Debug.Log("Prod Check Skipped: Not ready."); } return(true); } if (HasBeenProd) { if (!_hasLogged) { _hasLogged = true; Debug.Log("Prod Check: This is a prod device forever"); } return(true); } var localVersion = VersionCodes.GetVersionCode(); var prodVersion = GetProdVersionValue(); if (prodVersion == null || !prodVersion.Value.HasValue()) { return(true); } var version = prodVersion.Value.LongValue; if (!_hasLogged) { _hasLogged = true; Debug.Log($"Prod Check: {localVersion} -> {version}"); } var retval = localVersion <= version; if (retval) { HasBeenProd = true; } return(retval); }
public string clientVersion([XmlElement(ElementName = "strVersion")] string strClientVersion) { /* * * WC informing us of it's version. * * Example: * * "2.2.0.71" * * Return: * * "" - proceed * "W:message" - let the user decide * "E:message" - stop * "O:version" - stop and display version required (must be at least major.minor) * */ try { string message; VersionCodes versionCode = OnClientVersion(strClientVersion, out message); switch (versionCode) { case VersionCodes.WARNING: return($"W:{message}"); case VersionCodes.ERROR: return($"E:{message}"); case VersionCodes.OKAY: return($"O:{message}"); } //VALID return(""); } catch (Exception ex) { Fatal(ex); throw; } }
private void Awake() { GetComponent <Text>().text = "" + VersionCodes.GetVersionCode(); }
private void Awake() { GetComponent <Text>().text = $"{VersionCodes.GetVersionName()} ({VersionCodes.GetVersionCode()})"; }