The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

Is there any exposed helper for, instead of providing a path to a scene file (.tscn for example), provide its content, and get a Scene Resource?

Basically, any load() that instead of a path, receive the scene file content?

in Engine by (40 points)

What do you mean by content ?
Load() takes path as an argument and returns packedscene , which is the very content of the scene. If You save this packedscene as a variable, exposed helper will autocomplete anything regarded it, as from now on it will have information about every function,variable, child nodes and resources of this scene.

What Do You want to do in project ?

load() takes a path as argument, opens the scene file at the path, takes its content, parse it and return a PackedScene. Given this process, I want to provide the file content and return a PackedScene, instead of providing a path.

I am sorry, I don't get it, what content and how would You feed it to editor ? You mean raw scene file or what ? Where would this content come from if not from already packedscene ?

This content would come from a encryted_with_pass file, decrypted with the accordingly password. Usually would have to save that raw content as a file, load it with usual load(), and then delete the new created file. Wonder if the in-between of the load() is exposed so this is not needed and it gets from the raw content directly.

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 [email protected] with your username.