コード例 #1
0
ファイル: Config.cs プロジェクト: mobileash/xfgj-unity
    static Config()
    {
#if UNITY_ANDROID
        DB_PATH          = "URI=file:" + Application.persistentDataPath + "/xfgj.sqlite";
        STREAMING_ASSETS = "jar:file://" + Application.dataPath + "!/assets/";
        ASSETBUNDLE_PATH = STREAMING_ASSETS + "Android/";
        APP_NAME         = "wanzhuangxiu_android";
        APP_VERSION      = "1.0";
        ASSET_URL        = "http://xfgj-asset-android.u.qiniudn.com/";
#elif UNITY_IPHONE
        DB_PATH          = "Data Source=" + Application.persistentDataPath + "/xfgj.sqlite";
        STREAMING_ASSETS = Application.dataPath + "/Raw/";
        ASSETBUNDLE_PATH = STREAMING_ASSETS + "Ios/";
        APP_NAME         = "wanzhuangxiu_iphone";
        APP_VERSION      = IosPlugin.GetBundleVersion();
        ASSET_URL        = "http://xfgj-asset-iphone.u.qiniudn.com/";
#else
        DB_PATH          = "Data Source=xfgj.sqlite";
        STREAMING_ASSETS = "file://" + Application.dataPath + "/StreamingAssets/";
        ASSETBUNDLE_PATH = STREAMING_ASSETS + "Unity/";
        APP_NAME         = "wanzhuangxiu_unity";
        APP_VERSION      = "1.0";
        ASSET_URL        = "http://xfgj-asset-unity.u.qiniudn.com/";
#endif
#if XFGJ_RELEASE
        SERVER_URL = "http://www.xingfuguanjia.com";
#else
        SERVER_URL = "http://192.168.1.101:8000";
#endif
    }
コード例 #2
0
    private void ItemClick(GameObject go)
    {
        Debug.Log("Recommend click");
#if UNITY_IPHONE
        IosPlugin.OpenWebsite("http://www.baidu.com");
#elif UNITY_ANDROID
        Debug.Log("Android will open website");
#endif
    }
コード例 #3
0
ファイル: MultiPlatform.cs プロジェクト: mobileash/xfgj-unity
    public static string GetAppVersion()
    {
#if UNITY_IPHONE
        return(IosPlugin.GetBundleVersion());
#elif UNITY_ANDROID
        return("");
#else
        return("");
#endif
    }