-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathreadme.txt
More file actions
61 lines (38 loc) · 2.91 KB
/
readme.txt
File metadata and controls
61 lines (38 loc) · 2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
A Unityless way to read and write addressables.
Work in progress.
Nightly links:
- https://nightly.link/nesrak1/AddressablesTools/workflows/build-windows/master/addrtool-example-windows.zip
- https://nightly.link/nesrak1/AddressablesTools/workflows/build-ubuntu/master/addrtool-example-ubuntu.zip
Nuget link: https://www.nuget.org/packages/AssetsTools.NET.Addressables
Supported versions:
.---------------------------------------------.
| Version | Read support | Write support |
|--------------|--------------|---------------|
| Json "v1" | Yes | Yes |
| Json "v2" | Yes | Yes |
| Json "v3" | Yes | Yes |
| Binv1 | Yes | Yes* |
| Binv1 "v1.1" | Yes | Yes* |
| Binv2 | Yes | Yes |
`---------------------------------------------`
* - This support has not been thoroughly tested
---
To use the "Example" command line app to...
- patch catalog CRCs, run `Example patchcrc path/to/catalog.json` (replace .json with .bin if your game uses .bin)
- search for assets, run `Example searchasset path/to/catalog.json` and then type the key to search for
---
Using AddressablesTools is simple. Use either
AddressablesJsonParser.FromBundle("path/to/file.bundle");
or
AddressablesJsonParser.FromString(File.ReadAllText("path/to/file.json"));
From there, you can access the `Resources` dictionary which contains a mapping from an object (usually a string or number) to a list of resource locations.
In the `searchasset` example below, we can look up an asset string and find all of the bundles that are needed to load it. To do so, we find all keys that contain the substring we're searching for and that have resource locations with a `ProviderId` of `BundledAssetProvider`. After that, we can look up the `Dependency` id back into the `Resources` dictionary to find all of the necessary bundles. In this list, the first item is always the bundle that contains the asset, and all other bundles are dependencies needed by the first bundle.
This can be useful if you want to know what bundles you need to load in order to load an asset in a tool without having to load _every_ bundle in the game.
---
If you're still confused, maybe check out https://github.com/nesrak1/SeaOfStarsSpriteExtractor for a more "real-life" example.
---
The "Example" program contains two tools: searchasset and patchcrc.
The searchasset command takes an argument to the catalog.json or catalog.bundle file. It will then ask you for a string to search for and will display any results that it finds.
The patchcrc command also takes an argument to catalog.json or catalog.bundle. It sets the m_Crc of all entries to 0, effectively disabling all CRC checks.
---
This software is not sponsored by or affiliated with Unity Technologies or its affiliates. "Unity" is a registered trademark of Unity Technologies or its affiliates in the U.S. and elsewhere.