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.
Most of the time, you should just use the dependencies list in AssetsFileInstance.
AssetsFile contains file version info, the type tree for storing info about asset types, and a list of dependencies.LoadAssetsFile returns an AssetsFileInstance which is a wrapper for two classes. LoadAssetsFile( "resources.assets ", true) //true = load dependencies
#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.