Exemplo n.º 1
0
    public void listar_app(string app)
    {
#if UNITY_IPHONE
        IntPtr objectName    = Marshal.StringToHGlobalAuto(this.name);
        IntPtr messageName   = Marshal.StringToHGlobalAuto("SetButtonText");
        IntPtr parameterName = Marshal.StringToHGlobalAuto("New Text");

        OSHookBridge.SendUnityBridgeMessage(objectName, messageName, parameterName);
#elif UNITY_ANDROID
        TextoArrayApps = "" + OSHookBridge.ReturnString();
        textoapps.text = "" + TextoArrayApps;
        ArrayApps      = TextoArrayApps.Split(new string[] { "," }, StringSplitOptions.None);
        for (int i = 0; i < ArrayApps.Length; i++)
        {
            if (ArrayApps[i] == app)
            {
                mensaje.text = "correcto";
                break;
            }
            else
            {
                mensaje.text = "incorrecto";
            }
        }
#endif
    }
Exemplo n.º 2
0
    public void Open_App(string app)
    {
#if UNITY_IPHONE
        IntPtr objectName    = Marshal.StringToHGlobalAuto(this.name);
        IntPtr messageName   = Marshal.StringToHGlobalAuto("SetButtonText");
        IntPtr parameterName = Marshal.StringToHGlobalAuto("New Text");

        OSHookBridge.SendUnityBridgeMessage(objectName, messageName, parameterName);
#elif UNITY_ANDROID
        OSHookBridge.ShowAppID(app);
#endif
    }