I'm implementing the Facebook SDK in my Unity-created game and I'm having a lot of problems. I tried to implement the Facebook login system:
FB.LogInWithReadPermissions(new List<string>() { "public_profile", "email", "user_friends" }, AuthCallBack);
Only the following errors appeared:
NullReferenceException: Object reference not set to an instance of an object
NullReferenceException: Object reference not set to an instance of an object UnityEngine.GUILayoutEntry.ApplyStyleSettings (UnityEngine.GUIStyle style) (at
C: /buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs: 507) UnityEngine.GUILayoutGroup.ApplyStyleSettings (UnityEngine.GUIStyle style (at C: /buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs: 626) UnityEngine.GUILayoutEntry.set_style (UnityEngine.GUIStyle value) (at C: /buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs:471) UnityEngine.GUILayoutUtility.BeginWindow (Int32 windowID, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption [] options) (at C: /buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs: 91) UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) (at C: /buildslave/unity/build/Runtime/IMGUI/Managed/GUI.cs:1862)ArgumentException: Getting control 0's position in a group with only 0 controls when doing Repaint
ArgumentException: Getting control 0's position in a group with only 0 controls when doing Repaint Aborting UnityEngine.GUILayoutGroup.GetNext () (at C: /buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs:656) UnityEngine.GUILayoutUtility.DoGetRect (Single minWidth, Single maxWidth, Single minHeight, Single maxHeight, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption [] options) (at C: /buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs:401) UnityEngine.GUILayoutUtility.GetRect (Single width, Single height, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption [] options) (at C: /buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs: 375) UnityEngine.GUILayout.Space (Single pixels) (at C: /buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs:247) Facebook.Unity.Editor.EditorFacebookMockDialog.OnGUIDialog (Int32 windowId) (at Assets / FacebookSDK / SDK / Scripts / PlatformEditor / EditorFacebookMockDialog.cs: 90) UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) (at C: /buildslave/unity/build/Runtime/IMGUI/Managed/GUI.cs:1869)
How to solve this?