public void TranslationURL_OnClick()
    {
        if (string.IsNullOrEmpty(SGAppLauncher.defaultMessage))
        {
            return;
        }

        string url = SGStorage.GetGenericPref(keyURL, defaultURL);

        SGAppLauncher.LaunchURL(url);
    }
    private void SetPreviousValue()
    {
        //set previous value
#if UNITY_EDITOR
        appID = SGStorage.GetGenericPref(keyApp, defaultAndroidBundleID);
#elif UNITY_ANDROID
        appID = SGStorage.GetGenericPref(keyApp, defaultAndroidBundleID);
#endif
        apps.Insert(0, appID);
        dropdown.AddOptions(apps);
        dropdown.captionText.text = appID;
    }
    // Start is called before the first frame update
    void Start()
    {
        inputField = GetComponent <InputField>();

        //set previous value
        string url = "";

#if UNITY_EDITOR
        url = SGStorage.GetGenericPref(keyURL, defaultURL);
#elif UNITY_ANDROID
        url = SGStorage.GetGenericPref(keyURL, defaultURL);
#endif
        inputField.text = url;

        // set callbacks
        inputField.onEndEdit.AddListener(delegate { OnValueChanged(); });
    }
Ejemplo n.º 4
0
    private void TextInfo()
    {
        textInfo.text = "INFORMATIONS";
        // time
        textInfo.text += "\nDate Time: " + System.DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss");

        // user
        textInfo.text += "\nUser name: " + SGFirebase.userName;
        textInfo.text += "\nUser email: " + SGFirebase.userEmail;
        textInfo.text += "\nUser id: " + SGFirebase.userId;

        // screen
        textInfo.text += "\nScreen dpi: " + Screen.dpi;
        textInfo.text += "\nScreen orientation: " + Screen.orientation;
        textInfo.text += "\nScreen dimension pixels: " + Screen.width + "x" + Screen.height;

        // some player prefs
        foreach (string key in SGStorage.GetGenericPrefs())
        {
            textInfo.text += "\nGenericPrefs : " + key + "=" + SGStorage.GetGenericPref(key);
        }

        // environment
        textInfo.text += "\nProduct: " + SGEnvironment.GetProdutcName() + " " + SGEnvironment.GetVersion();
        textInfo.text += "\nProduct company name: " + Application.companyName;
        textInfo.text += "\nProduct absolute url: " + Application.absoluteURL;
        textInfo.text += "\nProduct build GUID: " + Application.buildGUID;
        textInfo.text += "\nProduct identifier: " + Application.identifier;
        textInfo.text += "\nProduct installer name: " + Application.installerName;
        textInfo.text += "\nProduct internet reachability: " + Application.internetReachability;
        textInfo.text += "\nProduct data path: " + Application.dataPath;
        textInfo.text += "\nProduct persistent data path: " + Application.persistentDataPath;
        textInfo.text += "\nProduct streaming assets path: " + Application.streamingAssetsPath;
        textInfo.text += "\nProduct temporary cache path: " + Application.temporaryCachePath;
        textInfo.text += "\nUnity: " + SGEnvironment.GetUnityVersion();
        textInfo.text += "\nDevice platform: " + Application.platform;
        textInfo.text += "\nDevice unique identifier: " + SystemInfo.deviceUniqueIdentifier;
        textInfo.text += "\nDevice name: " + SystemInfo.deviceName;
        textInfo.text += "\nDevice model: " + SystemInfo.deviceModel;
        textInfo.text += "\nDevice SO: " + SystemInfo.operatingSystem;
        textInfo.text += "\nDevice system language: " + Application.systemLanguage;
        textInfo.text += "\nDevice type: " + SystemInfo.deviceType;
        textInfo.text += "\nDevice memory size: " + SystemInfo.systemMemorySize.ToString();
        textInfo.text += "\nDevice processors: " + SystemInfo.processorCount.ToString();
        textInfo.text += "\nFirebase Ready: " + SGFirebase.SetupReady.ToString();
    }
    public void TranslationApp_OnClick()
    {
        if (string.IsNullOrEmpty(SGAppLauncher.defaultMessage))
        {
            return;
        }

        string url   = SGStorage.GetGenericPref(keyURL, defaultURL);
        string appID = "";

#if UNITY_EDITOR
        appID = SGStorage.GetGenericPref(keyApp, defaultAndroidBundleID);
#elif UNITY_ANDROID
        appID = SGStorage.GetGenericPref(keyApp, defaultAndroidBundleID);
#endif
        SGAppLauncher.LaunchApp(appID, url);
    }
Ejemplo n.º 6
0
    /// <summary>
    /// get the latest values for loaded remote settings
    /// </summary>
    public static string RemoteSettings(string propertyName, string defaultValue)
    {
        string newValue = "";

        if (SGDebug.DebugMode)
        {
            newValue = SGStorage.GetGenericPref(rsPreference + rsDebugPrefix + propertyName, defaultValue);
        }
        else
        {
            newValue = SGStorage.GetGenericPref(rsPreference + propertyName, defaultValue);
        }

        if (newValue == null)
        {
            newValue = defaultValue;
        }

        return(newValue);
    }