Search Unity

Loading CanvasFacebook.dll hangs the app

Discussion in 'Windows' started by TheMoose, Sep 17, 2014.

  1. TheMoose

    TheMoose

    Joined:
    Apr 23, 2014
    Posts:
    2
    Hi,

    I am currently trying to implement facebook features into my app using the official facebook unity sdk. Each time I try to run my app I get this:

    loading dll: https://integrated-plugin-canvas-rsrc.fbsbx.com/rsrc/unity/lib/sdk_6.0/CanvasFacebook.dll
    UnityEngine.Debug:Log(Object)
    FbDebug:Log(String)
    <LoadFacebookClass>c__Iterator1:MoveNext() (at Assets/Facebook/Scripts/FB.cs:394)
    UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    Facebook.EditorFacebook:OnAwake() (at Assets/Facebook/Scripts/EditorFacebook.cs:35)
    Facebook.AbstractFacebook:Awake()
    UnityEngine.GameObject:AddComponent()
    Facebook.FBComponentFactory:GetComponent(IfNotExist)
    Facebook.EditorFacebookLoader:get_fb() (at Assets/Facebook/Scripts/EditorFacebookLoader.cs:13)
    CompiledFacebookLoader:Start() (at Assets/Facebook/Scripts/FB.cs:484)

    And then nothing... It just hangs. No errors.

    Code:

    Code (CSharp):
    1. private void Awake() {
    2.         Debug.Log("awake");
    3.         enabled = false;
    4.         FB.Init(SetInit, OnHideUnity);
    5.     }
    6.  
    7.     private void SetInit()
    8.     {
    9.         Debug.Log("SetInit");
    10.         enabled = true; // "enabled" is a property inherited from MonoBehaviour                
    11.         if (FB.IsLoggedIn)
    12.         {
    13.             Debug.Log("Already logged in");
    14.             OnLoggedIn();
    15.         }
    16.     }
    17.  
    18.     void OnLoggedIn()
    19.     {
    20.         Debug.Log("Logged in. ID: " + FB.UserId);
    21.     }
    22.  
    23.     private void OnHideUnity(bool isGameShown)
    24.     {
    25.         Debug.Log("OnHideUnity");
    26.         if (!isGameShown)
    27.         {
    28.             // pause the game - we will need to hide                                            
    29.             Time.timeScale = 0;
    30.         }
    31.         else
    32.         {
    33.             // start the game back up - we're getting focus again                              
    34.             Time.timeScale = 1;
    35.         }
    36.     }    
    Happens on every windows platform (desktop, store, phone) on both the unity editor and the device. Any suggestions?
     
  2. talhahasan

    talhahasan

    Joined:
    May 7, 2015
    Posts:
    1
    Last edited: May 12, 2015