Skip to content

Godot Engine settings

Xavier Sellier edited this page Mar 12, 2018 · 1 revision

Using compiled templates

Export > Android > Custom Package, change fields Debug and Release to use the compiled android's templates (bin directory).

Loading the module

Edit engine.cfg and add an android part as following:

[android]
modules="org/godotengine/godot/GodotAndroid"

Initializing the module using GDScript

Here is an example

extends Node

onready var godot_android = Globals.get_singleton('GodotAndroid')

func _ready():
  if OS.get_name() == 'Android' and godot_android != null:
    godot_android.google_initialize(get_instance_ID())
  else:
    godot_android = null

func google_auth_connected(user):
  print('User %s has logged in' % [user])

func google_auth_connect_failed(message):
  print('Login failed %s' % [ message ])

func google_connect():
  if godot_android != null:
    godot_android.google_connect()
Clone this wiki locally