

Python-unitypack is licensed under the terms of the MIT license. Stripped classes will be prefixed with unitypack:stripped. !PPtr m_RuntimeCompatibility: 1 !unitypack:stripped:MovieTexture m_AudioClip: !PPtr m_ColorSpace: 1 m_Loop: false m_MovieData: m_Name: Cinematic !unitypack:AudioClip m_BitsPerSample: 16 m_Channels: 0 m_CompressionFormat: 0 m_Frequency: 0 m_IsTrackerFormat: false m_Legac圓D: false m_Length: 0.0 m_LoadInBackground: false m_LoadType: 0 m_Name: Cinematic audio m_PreloadAudioData: true m_Resource: !unitypack:StreamedResource m_Name: ' ' m_PreloadTable: Two objects (a MovieTexture cinematic and a corresponding AudioClip): Here is a stripped example of the movies0.unit圓d file from Hearthstone, which contains only Resulting YAML output far less heavy, as binary data will otherwise be converted to Base64 whichĬan result in extremely large text output.

When run with the -strip argument, extractable data will be stripped out. YAML is more appropriate than JSONĭue to the recursive, pointer-heavy and class-heavy nature of the Unit圓D format. Unity2yaml can convert AssetBundles to YAML output.

Run unityextract -help for the full list.

Included are two scripts which use unitypack for some common operations: Asset extraction The same dict of fields can be found in the _obj attribute of the instance, otherwise. a non-Unity class) is encountered, the resulting data is a dict of the fields instead. If a class is unimplemented, or a custom class Not all base Unit圓D classes are implemented. # The resulting `data` is a instance print( "Asset name:", data. # We avoid reading the data, unless it's a TextAsset data = object. # Let's say we only want TextAsset objects if object.
