+1 vote

So I've got this "score popup" which is basically a label with an animation displaying what score the player got when killing a certain enemy. E.g: "+100" or "+300". Problem is that, whenever I add this scene as a child, a lag spike occurs. Why is that??


extends Node

func _ready():

func set_label(text):
    $Label.text = str(text)

enter image description here

in Engine by (27 points)

You can use the profiler to find out which function is causing the lag spike, I doubt the functions you've posted are causing it.

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 Frequently asked questions and 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.