I’ve updated the fork, maybe you want to use it, with a parameter in project to ask for e-mail or not.
the e-mail is accessible after sign in with gpgs.get_user_email()
example code :
function init(self)
-- Add initialization code here
-- Learn more: https://defold.com/manuals/script/
-- Remove this function if not needed
if gpgs then
gpgs.set_callback(callback)
gpgs.silent_login()
end
end
function callback(self, message_id, message)
if message_id == gpgs.MSG_SIGN_IN or message_id == gpgs.MSG_SILENT_SIGN_IN then
if message.status == gpgs.STATUS_SUCCESS then
-- do something after login
print(gpgs.get_display_name())
print(gpgs.get_user_email())
end
elseif message_id == gpgs.MSG_SIGN_OUT then
-- do something after logout
elseif message_id == gpgs.MSG_LOAD_SNAPSHOT then
-- do something when a save was loaded
end
end