Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var bbAdmob = Globals.get_singleton("bbAdmob")
- #javaModule can call functions and pass parameters to the class defined in the Java Module I defined.
- so now I want to send data back from the java side of the wall into GDScript.
- The documentation says to use this function declaration
- GodotLib.calldeferred(<instanceid>, "<function>", new Object[]{param1,param2,etc})
- I have the instance id, I define a function and set some parameters,
- ex: GodotLib.calldeferred(m_device_id, "this_is_a_test", new Object[]{31, "thirty one", (float)31,(boolean)true, "False"});
- I can see something is happening because in the adb logcat displays this,
- I/godot ( 8513): ARGNAME: java.lang.Integer
- I/godot ( 8513): ARGNAME: java.lang.String
- I/godot ( 8513): ARGNAME: java.lang.Float
- I/godot ( 8513): ARGNAME: java.lang.Boolean
- I/godot ( 8513): ARGNAME: java.lang.String
- Those match the function that I setup but in GDScript I can't just do
- bbAdmob.do_something_in_java()
- #java code gets done
- How do I run this:GodotLib.calldeferred(<instanceid>, "<function>", new Object[]{param1,param2,etc})
- to get these params back to GDScript
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement