0 votes

I've instanced a built_in RichTextLabel node, yet it fails to physically appear in the editor. I've also checked If the parent has the instanced node, and it returns True, so I'm stumped as to what the solution is.

in Engine by (46 points)

Can you share us some code or what you've done?

1 Answer

+1 vote

Okay this is a really generic question, but I'll give it a shot.

Have you added the child to the scene

func my_func():
    var myfile = load("myscene.tscn").instance()
    add_child(myfile)

if soo then does it have text? Because it may seem invisible to you.

func my_func():
    var myfile = load("myscene.tscn").instance()
    myfile.set_text("TESTING")
    add_child(myfile)

Perhaps your trying to instance a new() object. You don't need to instance that. Just add it to the scene.

func my_func():
    var richtext = RichTextLabel.new()
    add_child(richtext) 
by (272 points)
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 [email protected] with your username.