What is the .asset format specifications ?

Hi,

I want to write in javascript a parser for a unity game project. The scene is in text and there is no problem. However, the .asset files are in binary and I do not want to spent my whole project time to find a way to parse them.
For a first task, I am interested on how to parse the terrain.asset file.
Any idea?

BR,
Dimitrios

“.asset” is used for a lot of different formats, most noticeable for Terrain data and scriptable custom assets (ScriptableObject). If you set your editor settings to “Force Text”, most of the .asset files will be YAML text files.

AFAIK, Unity does not officially release the binary scheme of its data files - nor the structure of the YAML file. (probably so they can change it at will in even the minor updates)

So basically, you are out of luck.

However, one last note: There is a tool located under “unity install dir/Editor/Data/Tools/binary2text.exe” that can convert unity-binary files into text representations. Its not YAML text but some simple human readable txt format. So if you really want to reverse engineer their binary format, this might help. :wink: