Godot version:
3.2.1
OS/device including version:
Mac OS 10.13.6
Issue description:
Can't add node.
Steps to reproduce:
extends Control
var richTextLabel = RichTextLabel.new()
var rtl = RichTextLabel.new()
func _ready():
richTextLabel.set_name("rich")
richTextLabel.set_use_bbcode(true)
richTextLabel.set_bbcode("BBCode [color=blue]blue[/color]")
richTextLabel.set_position(Vector2(0,0))
richTextLabel.set_visible_characters(-1)
rtl.add_text("Hello")
rtl.set_visible_characters(-1)
addNodes(rtl, richTextLabel)
func addNodes(rtl: RichTextLabel, richTextLabel: RichTextLabel):
self.add_child(rtl)
self.call_deferred("add_child", richTextLabel)
I can't reproduce the issue.
I've copied the code but the nodes are clearly added as children:

I think the problem is, that they aren't visible. That's probably because the size is (0, 0). I've manually edited the rect_size:

Thanks for responding @TheFlamyy
Since, visible characters is set to -1 shouldn't the contents be displayed. Is there a way to set the rect_size by code in gdscript?
Since, visible characters is set to -1 shouldn't the contents be displayed. Is there a way to set the rect_size by code in gdscript?
rtl.rect_size = Vector2(100, 200)
@Ev1lbl0w Thanks a lot. That worked.