Instancing objects in thread.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By

Hello! I can’t instance scene in thread because thread doesn’t return instance and i can’t add scene as node child.

What can I do to instance scene in thread?

func _process(_delta)
	if get_node_or_null('Props') == null:
		var thread =
		var instance = props.instance()
		for i in $Props/Scatter3D.get_children():
			if i.is_in_group('prop'):
				if i.get('data'):
					if props_data.has(get_path_to(i)): = props_data[get_path_to(i)]

You are only creating a thread not using it from the code you posted.

timothybrentwood | 2021-11-28 13:22