Google Play Games Services - When to init()?

Hi everyone! I’m using the Google Play Games Services for my game and wondering how the gameNetwork.init() and gameNetwork.request(“login”… functions should be called. From all the examples online, it appears that they call these functions when the game first loads up, but I would like to provide a “login button” on the front screen to handle this instead, giving users an option instead of immediately asking them. If they DO end up logging into GPGS, then I’d obvious like gameNetwork.request(“login”… to be called automatically when the game starts.

The example I’m inquiring about seems to be exactly how Cut The Rope 2 handles it. Anyone else out there do the same? Thanks!

You can call init just before you login and there is no reason to not delay that until your login button as long as you don’t have any scope issues.  However, there is no harm in calling init in your main.lua and delaying the login request either.

Rob

You can call init just before you login and there is no reason to not delay that until your login button as long as you don’t have any scope issues.  However, there is no harm in calling init in your main.lua and delaying the login request either.

Rob