0 votes

Hello !

I have an app which work on my desktop, but when I want to export it to android, my script never enter in the 'if' and stop the function...
Here is a little example of my problem :

extends Node

onready var button = get_node("gui/button")
onready var label = get_node("gui/label")

func _ready():
    button.connect("pressed", self, "function", [button.get_name()])

func function(name):
    if name.ends_with("ton"):
        label.set_text(name) # Never executed
    label.set_text('bar') # Never executed

Here is a simple project : https://ufile.io/87401

Should I report it ?

in Engine by (12 points)

How do you know your if is never called if you overwrite the label text just afterwards? Did you meant your label is never modified?

Yes, my label is not modified. :)

If an error occurred on Android, you can see a log for it with adb logcat

Ok, thanks.
All the functions in the String class don't work (for me...) in an Android tablet.
Do you know an other function like 'String.ends_with' ?

function is called? If no did you enable emulate_touchscreen in project settings?

Yes, function is called and emulate_touchscreen is enable.
It's just the String class which don't work.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.