Why asset files created by AssetDatabase.CreateAsset have different formats depending on computer?


Using Unity 5.6.1f1.

I am creating asset files with the same data (Texture3D), via exaclty same script on different machines with the use of AssetDatabase.CreateAsset method. On one machine the created asset consist of two files: asset file and asset_data file. Both files are in human-readable YAML format.
But on the second machine exactly the same code creates two assets files that consit of bytes instead of text.
Morover assets created on one machine don’t work on the second machine .

Where does this difference come from?
Is there any possibility of using the same asset on those different machines?
Can any one tell me how binary2text.exe tool transforms assets written in bytes to text? I tried several different approaches of converting it myself, but with no result.

It turns out that it asset format doesn’t depend on the machine type at all but just on Unity editor settings. You can force asset format in Editor Settings in Asset Serialization field. Just simply change it to Force Text and Unity will read and save assets in YAML format.

For those who want to deal with binary asset files here are my findings for Texture 3D. For example GUID numbers can be read (and edited) with Unix or Python hexdump tool. The trick is that the values on every byte are swapped. For example GUID number:
is read as:
27 0A 01 2C B8 DE C4 45 B2 EF A0 E8 00 F6 B3 FC.

If you want to explore Texture data and find, say, m_Width, m_Height or m_DataSize data, those are hidden - at least in my case - in binary code that comes right after file name (which happily is in plain text). You need to hexdump this part of the binary file, extract the values and convert them to decimal. For example:

00 01 00 02 is 65538 pixels m_Datasize,
00 01 00 is 256 pixels m_Height.

I didn’t go further into determining how exactly those values are separated in byte code, because I found mentioned Editor option to force assets to text format, but I guess that with this info it will be easier for anyone interested.