sharedInstance() public static method

public static sharedInstance ( ) : IGLink
return IGLink
示例#1
0
    // http://wiki.unity3d.com/index.php/ScreenCapture
    private IEnumerator SaveScreenShot()
    {
        yield return(new WaitForEndOfFrame());

        string filePath = Application.persistentDataPath + "/GLShareImage.png";

        //Create a texture to pass to encoding
        Texture2D texture = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, false);

        //Put buffer into texture
        texture.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0);

        //Split the process up--ReadPixels() and the GetPixels() call inside of the encoder are both pretty heavy
        yield return(0);

        byte[] bytes = texture.EncodeToPNG();

        //Save our test image (could also upload to WWW)
        File.WriteAllBytes(filePath, bytes);

        //Tell unity to delete the texture, by default it seems to keep hold of it and memory crashes will occur after too many screenshots.
        DestroyObject(texture);

        GLink.sharedInstance().executeArticlePostWithImage(filePath);
    }
示例#2
0
 public void OnClickGlinkButton()
 {
     // GLinkNaverId.sharedInstance().init("197CymaStozo7X5r2qR5", "evCgKH1kJL");
     // GLinkNaverId.sharedInstance().login();
     GLink.sharedInstance().setWidgetStartPosition(false, 60);
     GLink.sharedInstance().executeHome();
 }
示例#3
0
    void Start()
    {
        GLink.sharedInstance().init(CafeId, NaverLoginClientId, NaverLoginClientSecret);

        if (SupportGlobal)
        {
            GLink.sharedInstance().initGlobal(ConsumerKey, ConsumerSecureKey, CommunityNo, LoungeNo);
        }
    }
 void Start()
 {
     GLink.sharedInstance().init(LoungeId, NaverLoginClientId, NaverLoginClientSecret);
     GLinkDelegate.sdkCallInGameMenuCode += code =>
     {
         GLink.sharedInstance().terminateSdk();
         Debug.Log("CallInGameMenuCode : " + code);
     };
 }
示例#5
0
    public void executeCaptureScreenshopAndPostArticle(string dummy)
    {
        // For iOS , For Widget
        // Game ScreenShot Code
        StartCoroutine(this.CoFunction());

        Texture2D image = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, false);

        image.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0, true);
        image.Apply();

        byte[] bytes = image.EncodeToPNG();
        string path  = Application.persistentDataPath + "/GLShareImage.png";

        File.WriteAllBytes(path, bytes);

        GLink.sharedInstance().executeArticlePostWithImage(5, "", "", path);
    }
示例#6
0
 public void OnClickGlinkButton()
 {
     GLink.sharedInstance().setWidgetStartPosition(false, 60);
     GLink.sharedInstance().executeHome();
 }
示例#7
0
 public void OnClickGlinkButton()
 {
     GLink.sharedInstance().executeHome();
 }
示例#8
0
 public void gotoProfile()
 {
     GLink.sharedInstance().executeProfile();
 }
示例#9
0
 public void gotoEvnet()
 {
     GLink.sharedInstance().executeEvent();
 }
示例#10
0
 public void gotoNotice()
 {
     GLink.sharedInstance().executeNotice();
 }
示例#11
0
 public void gotoMenu()
 {
     GLink.sharedInstance().executeMenu();
 }
示例#12
0
 public void gotoHome()
 {
     GLink.sharedInstance().executeHome();
 }
 public void OnClickGlinkButton()
 {
     Debug.Log("click!");
     GLink.sharedInstance().executeHomeBanner();
 }