Esempio n. 1
0
    /// <summary>
    /// 分享Link,
    /// url:图片的路径
    /// modelName:模型本身的名字
    ///  modelText:模型上写的字
    ///  modelTransform:模型的Transform
    ///
    ///
    /// </summary>
    private bool ShareLink(string imagURL)
    {
        if (imagURL == null)
        {
            return(false);
        }
        ;



        MobLinkScene scene = new MobLinkScene("", "", YiyouStaticDataManager.Instance.GetHashtable());

        MobLink.getMobId(scene, (mobid) =>
        {
            if (mobid != null && mobid.Length > 0)
            {
                string linkUrl       = GlobalParameter.LinkWebURL + mobid;
                ShareContent content = new ShareContent();
                content.SetImagePath(imagURL);
                content.SetText("AR凉山游1");
                content.SetComment("AR凉山游2");
                content.SetSite("AR凉山游3");
                content.SetSiteUrl(linkUrl);
                content.SetTitle("AR凉山游4");
                content.SetTitleUrl(linkUrl);
                content.SetShareType(ContentType.Image);
                //通过分享菜单分享
                ssdk.ShowPlatformList(null, content, 100, 100);
            }
        });
        return(true);
    }
Esempio n. 2
0
 /// <summary>
 /// 全局的场景还原监听函数
 /// </summary>
 /// <param name="scene"></param>
 protected static void OnRestoreScene(MobLinkScene scene)
 {
     if (scene != null)
     {
         tempScene = scene;
         SceneManager.LoadScene(tempScene.customParams["sceneName"].ToString());
     }
 }