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);
        }
示例#2
0
 private void Awake()
 {
     GetComponent <Text>().text = "" + VersionCodes.GetVersionCode();
 }
示例#3
0
 private void Awake()
 {
     GetComponent <Text>().text = $"{VersionCodes.GetVersionName()} ({VersionCodes.GetVersionCode()})";
 }