+1 vote

Hello,
From what I understand, on the future, the scn/xscn scene should be deprecated and replaced by the new tscn file format. Taking this on account and my project which is hosted at a private git with many scenes on xscn format (50+ with many references).
Should I upgrade my project now?
What is the best way to upgrade it?

in Engine by (75 points)
edited by

1 Answer

+2 votes
Best answer

The .scn format won't be deprecated, as some users prefer it and it's still what the engine uses when exporting projects (it will convert the .tscn files to .scn on the fly for better performance in the exported version).

The .xscn format might be deprecated in the future yes, though there are no precise plans for that yet. But switching to .tscn is a good thing at any rate as it's awesome :)

Right now the conversion is a bit tedious. Here's how I do it:
- Open all .scn files and save them as .tscn
- Close the editor, and open the .tscn files with a text editor
- Replace all .scn extensions by .tscn (if you have scenes instanced in other scenes for example)
- Grep the source code for other uses of .scn (e.g. in a load or preload function and change that too)
- Open the project in Godot again, reopen all .tscn files and save them again (somehow the first conversion produces some strange artefacts, that will be removed when it's saved anew - there's a bug report for that).

Then if you have .res or .xres/.xml resources, a similar workflow can be used to convert them to .tres. At any rate, you're in for a few hours a playing around with the converter, and yeah that's annoying :D

Hopefully we can have a conversion tool to ease the process in 2.1.

by (1,903 points)
selected by

BTW, for the text editor step, I prefer to use Atom's find and replace in files functionality, or sed -i ... **.tscn.

After I finished this process on my project, god How much time it took you to change all the demos, this screams a conversion tool or batch, at least for the .scn to .tscn point.

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 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 webmaster@godotengine.org with your username.