

if you know you're only //reading this one asset, you can set to false to //speed things up a bit var inst = am. For more information about this file, see the classdata info section below. The classdata.tpk file, which you can get from the releases page, contains type info that isn't included assets files. This only applies to assets files and not bundles, which usually have type trees. Load class databaseīefore going any further, type information needs to be loaded. You can think of Standard classes like AssetsFile and AssetsFileTable as structs directly representing the file format and AssetsManager classes like AssetsFileInstance as classes that help linking files together.
Unity load atext asset full#
Here's a full example to read all name strings from all GameObjects from resources.assets. To help write code, you'll want to open the file you want to read/write in a tool like AssetsView.NET (in this repo) so you can see what assets have what fields.
Unity load atext asset code#
For example, there is no code to "extract sprites", but you can see the fields that store that information. Any asset type is supported, both in assets files and bundles, but making sense of it is up to you. However, you can pretty much edit anything and everything you want. The library is very low-level, and even with helper functions, some features still take a bit of boilerplate. The Standard namespace contains classes and methods that are similar to the original library.If there is a function here, you should prefer it over initializing things yourself. For example, AssetsManager helps manage loading multiple files and their dependencies and AssetHelper/ BundleHelper contains many useful miscellaneous methods. The Extra namespace contains classes and extension methods that aren't in the original library.Because of that, there are usually two ways to do something. The original api design and file formats (class package) comes from UABE's C++ AssetsTools library, but it has been rewritten in C# with many added helper functions.

This is a library for reading and writing unity assets files and bundle files.
