Convert text to packed scene

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

Is there a way to to take a tscn file (loaded as a string) and convert it to a packed scene?
(Any way to get a packed scene as a string and turn it back into a packed scene will work as well.)

I’m away from my computer atm. But can’t you use a load() function, and then use the loaded scene’s instance() method so as to pack it?

Ertain | 2018-04-27 17:16

The entire contents of the file are loaded as a string? Or just the path to the file?

Diet Estus | 2018-04-27 17:34

Whoops, sorry. Misunderstood what you were asking. :frowning:

Ertain | 2018-04-27 21:45

The entire contents.

Hubber116sx | 2018-04-28 00:25