c# - How to immediately get id token from google play services Unity Plugin -


i'm using https://github.com/playgameservices/play-games-plugin-for-unity plugin sign in user google account , , want id token , send server , register account user in own database.this code id token :

playgamesplatform.instance.authenticate(success => {     if (success)     {         debug.log("id token :");         debug.logformat("{0}", playgamesplatform.instance.getidtoken());         debug.log("end of id token");     } }); 

the problem first time prints empty string , when call second time (or moment later) prints token. want token immediately or callback make sure token recieved .

how make sure token recieved? there callback this?

thanks

they changed plugin in new version ,

playgamesplatform.instance.getidtoken(callback) 

has callback function.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -