Created
March 2, 2017 11:55
-
-
Save gkngkc/9d971afbf4a73e392bde45df46b7fb7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if UNITY_EDITOR | |
var mockLoginDialog = GameObject.FindObjectOfType<Facebook.Unity.Editor.Dialogs.MockLoginDialog>(); | |
if (mockLoginDialog != null) { | |
typeof(Facebook.Unity.Editor.Dialogs.MockLoginDialog).GetField("accessToken", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).SetValue(mockLoginDialog, "your_access_token"); | |
typeof(Facebook.Unity.Editor.Dialogs.MockLoginDialog).GetMethod("SendSuccessResult", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).Invoke(mockLoginDialog, null); | |
MonoBehaviour.Destroy(mockLoginDialog); | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment