What is the purpose of it?
It's a raw bytes of a file. Let's say that you want to import a file into Unity Resources folder and the file is not one of the supported resources files in Unity such as .png
, .mp3
and .mp4
, but you want Unity to include this special file extension in the final build, you change the file extension to .bytes
. It will be included in the final build and you can load and retrieve it during run-time with the Resources
API and TextAsset.bytes
. It's simply used to hold binary data.
How to use it for python?
You can like you would with any binary file in python.
byte = f.read(1)
binary_string = bin(int(binascii.hexlify(byte), 16))[2:].zfill(8)
See this for more information.