zoukankan      html  css  js  c++  java
  • Application.OpenURL()

    给大家推荐一个触控按钮直接跳转到指定网址的

    上代码

    using UnityEngine;
    using System.Collections;
    using TouchScript.Gestures;
    public class ApplicationONE : MonoBehaviour
    {
        string path = "http://www.cnblogs.com/unitySPK/";
        // Use this for initialization
        void OnEnable () {
            this.GetComponent<PressGesture>().Pressed += ApplicationONE_Pressed;
         }
    
        void ApplicationONE_Pressed(object sender, System.EventArgs e)
        {
            Application.OpenURL(path);
        }
        
        // Update is called once per frame
        void OnDisable () {
            this.GetComponent<PressGesture>().Pressed -= ApplicationONE_Pressed;
        }
    }

    那个OnEnable和OnDisable中的是一个添加点击的事件,用的是一个触屏插件TouchScript插件,这个插件挺好用的,下次给大家分享一下在项目如何运用的。

    最主要的代码就是一个指定的路径Path

    然后直接App了 OK了。

  • 相关阅读:
    Linux 常用命令
    Oracle DG 三种模式(转)
    S5PV2210
    Timer wheel etc.
    SCM etc.
    负载均衡 IO etc.
    Remoting,OData Snippet Compiler等
    displaytag 动态列实现
    <display:column>属性解释
    <display:table>属性解释
  • 原文地址:https://www.cnblogs.com/unitySPK/p/5086350.html
Copyright © 2011-2022 走看看