unity_scene_repacker 2.2.2__tar.gz → 2.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/.github/workflows/release.yml +12 -8
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/Cargo.lock +220 -27
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/Cargo.toml +1 -1
- unity_scene_repacker-2.4.0/PKG-INFO +7 -0
- unity_scene_repacker-2.4.0/README.md +173 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/cli/Cargo.toml +8 -0
- unity_scene_repacker-2.4.0/cli/src/lib.rs +401 -0
- unity_scene_repacker-2.4.0/cli/src/main.rs +3 -0
- unity_scene_repacker-2.4.0/cli/src/py.rs +21 -0
- unity_scene_repacker-2.4.0/data/purelib/unity_scene_repacker.libs/.gitkeep +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/examples/export_monobehaviour_typetrees.rs +5 -5
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/justfile +15 -1
- unity_scene_repacker-2.4.0/objects/ns-by-type.json +3 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/pyproject.toml +7 -1
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/src/env.rs +61 -4
- unity_scene_repacker-2.4.0/src/game_files.rs +99 -0
- unity_scene_repacker-2.4.0/src/lib.rs +757 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/src/merge_serialized.rs +72 -51
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/src/prune.rs +22 -12
- unity_scene_repacker-2.4.0/src/reachable.rs +55 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/src/scene_lookup.rs +2 -47
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/src/trace_pptr.rs +12 -1
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/src/typetree_generator_cache.rs +7 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/src/unity/types/utils.rs +12 -2
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/typetree-generator-api/Cargo.toml +1 -1
- unity_scene_repacker-2.4.0/typetree-generator-api/src/generated.rs +187 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/typetree-generator-api/src/lib.rs +59 -14
- unity_scene_repacker-2.2.2/PKG-INFO +0 -10
- unity_scene_repacker-2.2.2/README.md +0 -100
- unity_scene_repacker-2.2.2/cli/src/main.rs +0 -286
- unity_scene_repacker-2.2.2/src/game_files.rs +0 -73
- unity_scene_repacker-2.2.2/src/lib.rs +0 -536
- unity_scene_repacker-2.2.2/tt-api-lib/TypeTreeGeneratorAPI.lib +0 -0
- unity_scene_repacker-2.2.2/typetree-generator-api/build.rs +0 -3
- unity_scene_repacker-2.2.2/typetree-generator-api/src/generated.rs +0 -82
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/.clang-format +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/.gitignore +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/LICENSE.md +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/cli/src/completion.rs +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/cli/src/locate.rs +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/cli/src/logger.rs +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/cli/src/utils.rs +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/docs/demo-cast.svg +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/docs/demo.cast +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/docs/release.md +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/objects/hk-enemies.jsonc +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/objects/hk-representative.jsonc +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/objects/ns-monsters.json +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/rustfmt.toml +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/src/monobehaviour_typetree_export.rs +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/src/unity/mod.rs +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/src/unity/types.rs +0 -0
- {unity_scene_repacker-2.2.2 → unity_scene_repacker-2.4.0}/typetree-generator-api/bindings.h +0 -0
|
@@ -49,6 +49,8 @@ jobs:
|
|
|
49
49
|
manylinux: ""
|
|
50
50
|
steps:
|
|
51
51
|
- uses: actions/checkout@v4
|
|
52
|
+
- name: Install uv
|
|
53
|
+
uses: astral-sh/setup-uv@v6
|
|
52
54
|
- uses: actions/setup-dotnet@v4
|
|
53
55
|
with:
|
|
54
56
|
dotnet-version: "9.x"
|
|
@@ -62,13 +64,18 @@ jobs:
|
|
|
62
64
|
path: TypeTreeGeneratorAPI
|
|
63
65
|
- name: Publish TypeTreeGeneratorAPI with dotnet
|
|
64
66
|
run: dotnet publish TypeTreeGeneratorAPI/TypeTreeGeneratorAPI -o out --runtime ${{ matrix.rid }} -p:EnableAssetRipper=false -p:EnableAssetStudio=false -p:EnableAssetsTools=true -p:EnableIL2CPP=false
|
|
65
|
-
- name: Copy
|
|
66
|
-
|
|
67
|
-
run:
|
|
67
|
+
- name: Copy
|
|
68
|
+
shell: bash
|
|
69
|
+
run: |
|
|
70
|
+
if [[ "${{ runner.os }}" == "Windows" ]]; then
|
|
71
|
+
cp out/TypeTreeGeneratorAPI.dll data/purelib/unity_scene_repacker.libs
|
|
72
|
+
elif [[ "${{ runner.os }}" == "macOS" ]]; then
|
|
73
|
+
cp out/libTypeTreeGeneratorAPI.dylib data/purelib/unity_scene_repacker.libs
|
|
74
|
+
else
|
|
75
|
+
cp out/libTypeTreeGeneratorAPI.so data/purelib/unity_scene_repacker.libs
|
|
76
|
+
fi
|
|
68
77
|
|
|
69
78
|
- name: Build bindings
|
|
70
|
-
env:
|
|
71
|
-
RUSTFLAGS: "-L out"
|
|
72
79
|
run: cargo build --release -p bindings
|
|
73
80
|
- name: Copy artifacts
|
|
74
81
|
shell: bash # todo: replace this with --artifact-dir when finally stable
|
|
@@ -88,9 +95,6 @@ jobs:
|
|
|
88
95
|
path: out/*
|
|
89
96
|
|
|
90
97
|
- name: Build cli wheels
|
|
91
|
-
env:
|
|
92
|
-
RUSTFLAGS: "-L out"
|
|
93
|
-
LD_LIBRARY_PATH: "${{ github.workspace }}/out"
|
|
94
98
|
uses: jakobhellermann/maturin-action@allow-ld-env
|
|
95
99
|
with:
|
|
96
100
|
target: ${{ matrix.target }}
|
|
@@ -58,9 +58,15 @@ version = "1.0.98"
|
|
|
58
58
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
59
59
|
checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
|
|
60
60
|
|
|
61
|
+
[[package]]
|
|
62
|
+
name = "autocfg"
|
|
63
|
+
version = "1.5.0"
|
|
64
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
65
|
+
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
|
66
|
+
|
|
61
67
|
[[package]]
|
|
62
68
|
name = "bindings"
|
|
63
|
-
version = "2.
|
|
69
|
+
version = "2.4.0"
|
|
64
70
|
dependencies = [
|
|
65
71
|
"anyhow",
|
|
66
72
|
"indexmap",
|
|
@@ -92,9 +98,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
|
|
92
98
|
|
|
93
99
|
[[package]]
|
|
94
100
|
name = "cc"
|
|
95
|
-
version = "1.2.
|
|
101
|
+
version = "1.2.30"
|
|
96
102
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
97
|
-
checksum = "
|
|
103
|
+
checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7"
|
|
98
104
|
dependencies = [
|
|
99
105
|
"shlex",
|
|
100
106
|
]
|
|
@@ -107,9 +113,9 @@ checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"
|
|
|
107
113
|
|
|
108
114
|
[[package]]
|
|
109
115
|
name = "clap"
|
|
110
|
-
version = "4.5.
|
|
116
|
+
version = "4.5.41"
|
|
111
117
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
112
|
-
checksum = "
|
|
118
|
+
checksum = "be92d32e80243a54711e5d7ce823c35c41c9d929dc4ab58e1276f625841aadf9"
|
|
113
119
|
dependencies = [
|
|
114
120
|
"clap_builder",
|
|
115
121
|
"clap_derive",
|
|
@@ -117,9 +123,9 @@ dependencies = [
|
|
|
117
123
|
|
|
118
124
|
[[package]]
|
|
119
125
|
name = "clap_builder"
|
|
120
|
-
version = "4.5.
|
|
126
|
+
version = "4.5.41"
|
|
121
127
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
122
|
-
checksum = "
|
|
128
|
+
checksum = "707eab41e9622f9139419d573eca0900137718000c517d47da73045f54331c3d"
|
|
123
129
|
dependencies = [
|
|
124
130
|
"anstream",
|
|
125
131
|
"anstyle",
|
|
@@ -129,9 +135,9 @@ dependencies = [
|
|
|
129
135
|
|
|
130
136
|
[[package]]
|
|
131
137
|
name = "clap_complete"
|
|
132
|
-
version = "4.5.
|
|
138
|
+
version = "4.5.55"
|
|
133
139
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
134
|
-
checksum = "
|
|
140
|
+
checksum = "a5abde44486daf70c5be8b8f8f1b66c49f86236edf6fa2abadb4d961c4c6229a"
|
|
135
141
|
dependencies = [
|
|
136
142
|
"clap",
|
|
137
143
|
"clap_lex",
|
|
@@ -141,9 +147,9 @@ dependencies = [
|
|
|
141
147
|
|
|
142
148
|
[[package]]
|
|
143
149
|
name = "clap_derive"
|
|
144
|
-
version = "4.5.
|
|
150
|
+
version = "4.5.41"
|
|
145
151
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
146
|
-
checksum = "
|
|
152
|
+
checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491"
|
|
147
153
|
dependencies = [
|
|
148
154
|
"anstyle",
|
|
149
155
|
"heck",
|
|
@@ -298,6 +304,12 @@ dependencies = [
|
|
|
298
304
|
"serde",
|
|
299
305
|
]
|
|
300
306
|
|
|
307
|
+
[[package]]
|
|
308
|
+
name = "indoc"
|
|
309
|
+
version = "2.0.6"
|
|
310
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
311
|
+
checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
|
|
312
|
+
|
|
301
313
|
[[package]]
|
|
302
314
|
name = "is_executable"
|
|
303
315
|
version = "1.0.4"
|
|
@@ -357,6 +369,16 @@ version = "0.2.174"
|
|
|
357
369
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
358
370
|
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
|
|
359
371
|
|
|
372
|
+
[[package]]
|
|
373
|
+
name = "libloading"
|
|
374
|
+
version = "0.8.8"
|
|
375
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
376
|
+
checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"
|
|
377
|
+
dependencies = [
|
|
378
|
+
"cfg-if",
|
|
379
|
+
"windows-targets 0.53.2",
|
|
380
|
+
]
|
|
381
|
+
|
|
360
382
|
[[package]]
|
|
361
383
|
name = "log"
|
|
362
384
|
version = "0.4.27"
|
|
@@ -398,6 +420,15 @@ dependencies = [
|
|
|
398
420
|
"crc",
|
|
399
421
|
]
|
|
400
422
|
|
|
423
|
+
[[package]]
|
|
424
|
+
name = "md4"
|
|
425
|
+
version = "0.10.2"
|
|
426
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
427
|
+
checksum = "7da5ac363534dce5fabf69949225e174fbf111a498bf0ff794c8ea1fba9f3dda"
|
|
428
|
+
dependencies = [
|
|
429
|
+
"digest",
|
|
430
|
+
]
|
|
431
|
+
|
|
401
432
|
[[package]]
|
|
402
433
|
name = "memchr"
|
|
403
434
|
version = "2.7.5"
|
|
@@ -406,13 +437,22 @@ checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
|
|
|
406
437
|
|
|
407
438
|
[[package]]
|
|
408
439
|
name = "memmap2"
|
|
409
|
-
version = "0.9.
|
|
440
|
+
version = "0.9.7"
|
|
410
441
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
411
|
-
checksum = "
|
|
442
|
+
checksum = "483758ad303d734cec05e5c12b41d7e93e6a6390c5e9dae6bdeb7c1259012d28"
|
|
412
443
|
dependencies = [
|
|
413
444
|
"libc",
|
|
414
445
|
]
|
|
415
446
|
|
|
447
|
+
[[package]]
|
|
448
|
+
name = "memoffset"
|
|
449
|
+
version = "0.9.1"
|
|
450
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
451
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
452
|
+
dependencies = [
|
|
453
|
+
"autocfg",
|
|
454
|
+
]
|
|
455
|
+
|
|
416
456
|
[[package]]
|
|
417
457
|
name = "num_enum"
|
|
418
458
|
version = "0.7.4"
|
|
@@ -434,6 +474,12 @@ dependencies = [
|
|
|
434
474
|
"syn",
|
|
435
475
|
]
|
|
436
476
|
|
|
477
|
+
[[package]]
|
|
478
|
+
name = "once_cell"
|
|
479
|
+
version = "1.21.3"
|
|
480
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
481
|
+
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
|
482
|
+
|
|
437
483
|
[[package]]
|
|
438
484
|
name = "once_cell_polyfill"
|
|
439
485
|
version = "1.70.1"
|
|
@@ -490,6 +536,12 @@ dependencies = [
|
|
|
490
536
|
"sha2",
|
|
491
537
|
]
|
|
492
538
|
|
|
539
|
+
[[package]]
|
|
540
|
+
name = "portable-atomic"
|
|
541
|
+
version = "1.11.1"
|
|
542
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
543
|
+
checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
|
|
544
|
+
|
|
493
545
|
[[package]]
|
|
494
546
|
name = "proc-macro2"
|
|
495
547
|
version = "1.0.95"
|
|
@@ -510,6 +562,68 @@ dependencies = [
|
|
|
510
562
|
"unicase",
|
|
511
563
|
]
|
|
512
564
|
|
|
565
|
+
[[package]]
|
|
566
|
+
name = "pyo3"
|
|
567
|
+
version = "0.25.1"
|
|
568
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
569
|
+
checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a"
|
|
570
|
+
dependencies = [
|
|
571
|
+
"indoc",
|
|
572
|
+
"libc",
|
|
573
|
+
"memoffset",
|
|
574
|
+
"once_cell",
|
|
575
|
+
"portable-atomic",
|
|
576
|
+
"pyo3-build-config",
|
|
577
|
+
"pyo3-ffi",
|
|
578
|
+
"pyo3-macros",
|
|
579
|
+
"unindent",
|
|
580
|
+
]
|
|
581
|
+
|
|
582
|
+
[[package]]
|
|
583
|
+
name = "pyo3-build-config"
|
|
584
|
+
version = "0.25.1"
|
|
585
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
586
|
+
checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598"
|
|
587
|
+
dependencies = [
|
|
588
|
+
"once_cell",
|
|
589
|
+
"target-lexicon",
|
|
590
|
+
]
|
|
591
|
+
|
|
592
|
+
[[package]]
|
|
593
|
+
name = "pyo3-ffi"
|
|
594
|
+
version = "0.25.1"
|
|
595
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
596
|
+
checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c"
|
|
597
|
+
dependencies = [
|
|
598
|
+
"libc",
|
|
599
|
+
"pyo3-build-config",
|
|
600
|
+
]
|
|
601
|
+
|
|
602
|
+
[[package]]
|
|
603
|
+
name = "pyo3-macros"
|
|
604
|
+
version = "0.25.1"
|
|
605
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
606
|
+
checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50"
|
|
607
|
+
dependencies = [
|
|
608
|
+
"proc-macro2",
|
|
609
|
+
"pyo3-macros-backend",
|
|
610
|
+
"quote",
|
|
611
|
+
"syn",
|
|
612
|
+
]
|
|
613
|
+
|
|
614
|
+
[[package]]
|
|
615
|
+
name = "pyo3-macros-backend"
|
|
616
|
+
version = "0.25.1"
|
|
617
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
618
|
+
checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc"
|
|
619
|
+
dependencies = [
|
|
620
|
+
"heck",
|
|
621
|
+
"proc-macro2",
|
|
622
|
+
"pyo3-build-config",
|
|
623
|
+
"quote",
|
|
624
|
+
"syn",
|
|
625
|
+
]
|
|
626
|
+
|
|
513
627
|
[[package]]
|
|
514
628
|
name = "quote"
|
|
515
629
|
version = "1.0.40"
|
|
@@ -522,7 +636,7 @@ dependencies = [
|
|
|
522
636
|
[[package]]
|
|
523
637
|
name = "rabex"
|
|
524
638
|
version = "0.0.3"
|
|
525
|
-
source = "git+https://github.com/jakobhellermann/RustyAssetBundleEXtractor?branch=all#
|
|
639
|
+
source = "git+https://github.com/jakobhellermann/RustyAssetBundleEXtractor?branch=all#acfe69b89d4f976cc2f1a2303026cdbcc6de40c9"
|
|
526
640
|
dependencies = [
|
|
527
641
|
"bitflags",
|
|
528
642
|
"byteorder",
|
|
@@ -530,6 +644,7 @@ dependencies = [
|
|
|
530
644
|
"lz4",
|
|
531
645
|
"lz4_flex",
|
|
532
646
|
"lzma-rs",
|
|
647
|
+
"md4",
|
|
533
648
|
"num_enum",
|
|
534
649
|
"rustc-hash",
|
|
535
650
|
"serde",
|
|
@@ -596,9 +711,9 @@ dependencies = [
|
|
|
596
711
|
|
|
597
712
|
[[package]]
|
|
598
713
|
name = "serde_json"
|
|
599
|
-
version = "1.0.
|
|
714
|
+
version = "1.0.141"
|
|
600
715
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
601
|
-
checksum = "
|
|
716
|
+
checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3"
|
|
602
717
|
dependencies = [
|
|
603
718
|
"indexmap",
|
|
604
719
|
"itoa",
|
|
@@ -661,6 +776,12 @@ dependencies = [
|
|
|
661
776
|
"unicode-ident",
|
|
662
777
|
]
|
|
663
778
|
|
|
779
|
+
[[package]]
|
|
780
|
+
name = "target-lexicon"
|
|
781
|
+
version = "0.13.2"
|
|
782
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
783
|
+
checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a"
|
|
784
|
+
|
|
664
785
|
[[package]]
|
|
665
786
|
name = "thiserror"
|
|
666
787
|
version = "1.0.69"
|
|
@@ -711,6 +832,7 @@ checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
|
|
|
711
832
|
name = "typetree-generator-api"
|
|
712
833
|
version = "1.0.0"
|
|
713
834
|
dependencies = [
|
|
835
|
+
"libloading",
|
|
714
836
|
"rabex",
|
|
715
837
|
]
|
|
716
838
|
|
|
@@ -732,9 +854,15 @@ version = "1.0.18"
|
|
|
732
854
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
733
855
|
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
|
|
734
856
|
|
|
857
|
+
[[package]]
|
|
858
|
+
name = "unindent"
|
|
859
|
+
version = "0.2.4"
|
|
860
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
861
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
862
|
+
|
|
735
863
|
[[package]]
|
|
736
864
|
name = "unity-scene-repacker"
|
|
737
|
-
version = "2.
|
|
865
|
+
version = "2.4.0"
|
|
738
866
|
dependencies = [
|
|
739
867
|
"anyhow",
|
|
740
868
|
"byteorder",
|
|
@@ -754,7 +882,7 @@ dependencies = [
|
|
|
754
882
|
|
|
755
883
|
[[package]]
|
|
756
884
|
name = "unity-scene-repacker-bin"
|
|
757
|
-
version = "2.
|
|
885
|
+
version = "2.4.0"
|
|
758
886
|
dependencies = [
|
|
759
887
|
"anyhow",
|
|
760
888
|
"clap",
|
|
@@ -763,6 +891,7 @@ dependencies = [
|
|
|
763
891
|
"json5",
|
|
764
892
|
"log",
|
|
765
893
|
"paris",
|
|
894
|
+
"pyo3",
|
|
766
895
|
"rabex",
|
|
767
896
|
"steamlocate",
|
|
768
897
|
"unity-scene-repacker",
|
|
@@ -808,7 +937,7 @@ version = "0.59.0"
|
|
|
808
937
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
809
938
|
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
|
810
939
|
dependencies = [
|
|
811
|
-
"windows-targets",
|
|
940
|
+
"windows-targets 0.52.6",
|
|
812
941
|
]
|
|
813
942
|
|
|
814
943
|
[[package]]
|
|
@@ -817,14 +946,30 @@ version = "0.52.6"
|
|
|
817
946
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
818
947
|
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
|
819
948
|
dependencies = [
|
|
820
|
-
"windows_aarch64_gnullvm",
|
|
821
|
-
"windows_aarch64_msvc",
|
|
822
|
-
"windows_i686_gnu",
|
|
823
|
-
"windows_i686_gnullvm",
|
|
824
|
-
"windows_i686_msvc",
|
|
825
|
-
"windows_x86_64_gnu",
|
|
826
|
-
"windows_x86_64_gnullvm",
|
|
827
|
-
"windows_x86_64_msvc",
|
|
949
|
+
"windows_aarch64_gnullvm 0.52.6",
|
|
950
|
+
"windows_aarch64_msvc 0.52.6",
|
|
951
|
+
"windows_i686_gnu 0.52.6",
|
|
952
|
+
"windows_i686_gnullvm 0.52.6",
|
|
953
|
+
"windows_i686_msvc 0.52.6",
|
|
954
|
+
"windows_x86_64_gnu 0.52.6",
|
|
955
|
+
"windows_x86_64_gnullvm 0.52.6",
|
|
956
|
+
"windows_x86_64_msvc 0.52.6",
|
|
957
|
+
]
|
|
958
|
+
|
|
959
|
+
[[package]]
|
|
960
|
+
name = "windows-targets"
|
|
961
|
+
version = "0.53.2"
|
|
962
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
963
|
+
checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef"
|
|
964
|
+
dependencies = [
|
|
965
|
+
"windows_aarch64_gnullvm 0.53.0",
|
|
966
|
+
"windows_aarch64_msvc 0.53.0",
|
|
967
|
+
"windows_i686_gnu 0.53.0",
|
|
968
|
+
"windows_i686_gnullvm 0.53.0",
|
|
969
|
+
"windows_i686_msvc 0.53.0",
|
|
970
|
+
"windows_x86_64_gnu 0.53.0",
|
|
971
|
+
"windows_x86_64_gnullvm 0.53.0",
|
|
972
|
+
"windows_x86_64_msvc 0.53.0",
|
|
828
973
|
]
|
|
829
974
|
|
|
830
975
|
[[package]]
|
|
@@ -833,48 +978,96 @@ version = "0.52.6"
|
|
|
833
978
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
834
979
|
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
|
835
980
|
|
|
981
|
+
[[package]]
|
|
982
|
+
name = "windows_aarch64_gnullvm"
|
|
983
|
+
version = "0.53.0"
|
|
984
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
985
|
+
checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
|
|
986
|
+
|
|
836
987
|
[[package]]
|
|
837
988
|
name = "windows_aarch64_msvc"
|
|
838
989
|
version = "0.52.6"
|
|
839
990
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
840
991
|
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
|
841
992
|
|
|
993
|
+
[[package]]
|
|
994
|
+
name = "windows_aarch64_msvc"
|
|
995
|
+
version = "0.53.0"
|
|
996
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
997
|
+
checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
|
|
998
|
+
|
|
842
999
|
[[package]]
|
|
843
1000
|
name = "windows_i686_gnu"
|
|
844
1001
|
version = "0.52.6"
|
|
845
1002
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
846
1003
|
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
|
847
1004
|
|
|
1005
|
+
[[package]]
|
|
1006
|
+
name = "windows_i686_gnu"
|
|
1007
|
+
version = "0.53.0"
|
|
1008
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1009
|
+
checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
|
|
1010
|
+
|
|
848
1011
|
[[package]]
|
|
849
1012
|
name = "windows_i686_gnullvm"
|
|
850
1013
|
version = "0.52.6"
|
|
851
1014
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
852
1015
|
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
|
853
1016
|
|
|
1017
|
+
[[package]]
|
|
1018
|
+
name = "windows_i686_gnullvm"
|
|
1019
|
+
version = "0.53.0"
|
|
1020
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1021
|
+
checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
|
|
1022
|
+
|
|
854
1023
|
[[package]]
|
|
855
1024
|
name = "windows_i686_msvc"
|
|
856
1025
|
version = "0.52.6"
|
|
857
1026
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
858
1027
|
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
|
859
1028
|
|
|
1029
|
+
[[package]]
|
|
1030
|
+
name = "windows_i686_msvc"
|
|
1031
|
+
version = "0.53.0"
|
|
1032
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1033
|
+
checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
|
|
1034
|
+
|
|
860
1035
|
[[package]]
|
|
861
1036
|
name = "windows_x86_64_gnu"
|
|
862
1037
|
version = "0.52.6"
|
|
863
1038
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
864
1039
|
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
|
865
1040
|
|
|
1041
|
+
[[package]]
|
|
1042
|
+
name = "windows_x86_64_gnu"
|
|
1043
|
+
version = "0.53.0"
|
|
1044
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1045
|
+
checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
|
|
1046
|
+
|
|
866
1047
|
[[package]]
|
|
867
1048
|
name = "windows_x86_64_gnullvm"
|
|
868
1049
|
version = "0.52.6"
|
|
869
1050
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
870
1051
|
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
|
871
1052
|
|
|
1053
|
+
[[package]]
|
|
1054
|
+
name = "windows_x86_64_gnullvm"
|
|
1055
|
+
version = "0.53.0"
|
|
1056
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1057
|
+
checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
|
|
1058
|
+
|
|
872
1059
|
[[package]]
|
|
873
1060
|
name = "windows_x86_64_msvc"
|
|
874
1061
|
version = "0.52.6"
|
|
875
1062
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
876
1063
|
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
|
877
1064
|
|
|
1065
|
+
[[package]]
|
|
1066
|
+
name = "windows_x86_64_msvc"
|
|
1067
|
+
version = "0.53.0"
|
|
1068
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1069
|
+
checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
|
|
1070
|
+
|
|
878
1071
|
[[package]]
|
|
879
1072
|
name = "winreg"
|
|
880
1073
|
version = "0.55.0"
|
|
@@ -26,7 +26,7 @@ typetree-generator-api.workspace = true
|
|
|
26
26
|
members = ["cli", "typetree-generator-api"]
|
|
27
27
|
default-members = [".", "bindings", "cli", "typetree-generator-api"]
|
|
28
28
|
|
|
29
|
-
package.version = "2.
|
|
29
|
+
package.version = "2.4.0"
|
|
30
30
|
package.edition = "2024"
|
|
31
31
|
package.license = "MIT"
|
|
32
32
|
package.repository = "https://github.com/jakobhellermann/unity-scene-repacker"
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# unity-scene-repacker
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
When modding a unity game, you often want to `Instantiate` objects from a scene that isn't loaded.
|
|
6
|
+
One solution for this is to load all the scenes you're interested in at startup, copy the gameobjects somewhere and unload the scene.
|
|
7
|
+
This works, but is slow and memory intensive.
|
|
8
|
+
|
|
9
|
+
This project lets you read scenes from the distributed game, take only what you need, and package those objects into an [AssetBundle](https://docs.unity3d.com/Manual/AssetBundlesIntro.html) that you can load at runtime.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
uv tool install unity-scene-repacker
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
`unity-scene-repacker` can repack objects into two kinds of [`AssetBundle`](https://docs.unity3d.com/ScriptReference/AssetBundle.html)s.
|
|
20
|
+
- Scene bundles contain the original scenes, filtered down to only the requested objects.
|
|
21
|
+
- Asset bundles allow you to selectively load objects without having to load all of them, but are a bit more experimental.
|
|
22
|
+
|
|
23
|
+
**Scene bundle**:
|
|
24
|
+
|
|
25
|
+
```jsonc
|
|
26
|
+
objects.json
|
|
27
|
+
{
|
|
28
|
+
"Fungus1_12": [
|
|
29
|
+
"simple_grass",
|
|
30
|
+
"green_grass_2",
|
|
31
|
+
"green_grass_3",
|
|
32
|
+
"green_grass_1 (1)"
|
|
33
|
+
],
|
|
34
|
+
"White_Palace_01": [
|
|
35
|
+
"WhiteBench",
|
|
36
|
+
"White_ Spikes"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
unity-scene-repacker \
|
|
43
|
+
--steam-game 'Hollow Knight' \
|
|
44
|
+
--scene-objects objects.json \
|
|
45
|
+
--mode scene \
|
|
46
|
+
--output mybundle.unity3d
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
```cs
|
|
51
|
+
const string bundleName = "mybundle";
|
|
52
|
+
var bundle = AssetBundle.LoadFromFile(path);
|
|
53
|
+
|
|
54
|
+
// load single scene
|
|
55
|
+
SceneManager.LoadScene($"unity-scene-repacker/{bundleName}/Fungus1_12.unity")
|
|
56
|
+
|
|
57
|
+
// load add scenes
|
|
58
|
+
foreach (string scenePath in bundle.GetAllScenePaths()) {
|
|
59
|
+
string sceneName = Path.GetFileNameWithoutExtension(scenePath);
|
|
60
|
+
SceneManager.LoadScene(sceneName, LoadSceneMode.Additive);
|
|
61
|
+
var scene = USceneManager.GetSceneByPath(scenePath);
|
|
62
|
+
var roots = scene.GetRootGameObjects();
|
|
63
|
+
}
|
|
64
|
+
bundle.Unload();
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Asset bundle**:
|
|
68
|
+
|
|
69
|
+
Asset bundles allow you to selectively load objects, without having to load the others into memory.
|
|
70
|
+
However, the implementation is a bit more experimental, so if something doesn't work, try the scene output instead.
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
unity-scene-repacker \
|
|
74
|
+
--steam-game 'Hollow Knight' \
|
|
75
|
+
--scene-objects objects.json \
|
|
76
|
+
--mode asset \
|
|
77
|
+
--output mybundle.unity3d
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
```cs
|
|
82
|
+
var bundle = AssetBundle.LoadFromFile(path);
|
|
83
|
+
var prefab = bundle.LoadAsset<GameObject>("Fungus1_12/simple_grass");
|
|
84
|
+
var object = Instantiate(prefab);
|
|
85
|
+
bundle.Unload();
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The `asset` output mode also allows you to additionally specify arbitrary other objects (e.g. `ScriptableObject`s) by name:
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"FXDealerMaterialTag": ["[FXDealer] 0_YeeAttack _PostureDecrease"]
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
unity-scene-repacker ... --extra-objects objects-by-type.json --mode asset
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
```cs
|
|
101
|
+
var object = bundle.LoadAsset<FXDealerMaterialTag>("ExtraObjects/FXDealerMaterialTag/[FXDealer] 0_YeeAttack _PostureDecrease.prefab");
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### CLI Reference
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
Usage: unity-scene-repacker [OPTIONS] <--game-dir <GAME_DIR>|--steam-game <STEAM_GAME>>
|
|
108
|
+
|
|
109
|
+
Options:
|
|
110
|
+
-h, --help
|
|
111
|
+
Print help (see a summary with '-h')
|
|
112
|
+
|
|
113
|
+
-V, --version
|
|
114
|
+
Print version
|
|
115
|
+
|
|
116
|
+
Game options:
|
|
117
|
+
--game-dir <GAME_DIR>
|
|
118
|
+
Directory where the levels files are, e.g. steam/Hollow_Knight/hollow_knight_Data
|
|
119
|
+
|
|
120
|
+
--steam-game <STEAM_GAME>
|
|
121
|
+
App ID or search term for the steam game to detect
|
|
122
|
+
|
|
123
|
+
Repack options:
|
|
124
|
+
--scene-objects <SCENE_OBJECTS>
|
|
125
|
+
Path to JSON file, containing a map of scene name to a list of gameobject paths to include
|
|
126
|
+
|
|
127
|
+
{
|
|
128
|
+
"Fungus1_12": [
|
|
129
|
+
"simple_grass",
|
|
130
|
+
"green_grass_2",
|
|
131
|
+
],
|
|
132
|
+
"White_Palace_01": [
|
|
133
|
+
"WhiteBench",
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
--extra-objects <EXTRA_OBJECTS>
|
|
139
|
+
Path to JSON file, containing a map of C# type to monobehaviour names. Useful for scriptable objects etc., which do not exist in the transform hierarchy.
|
|
140
|
+
|
|
141
|
+
{
|
|
142
|
+
"FXDealerMaterialTag": ["[FXDealer] 0_YeeAttack _PostureDecrease"]
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
Output options:
|
|
147
|
+
--mode <MODE>
|
|
148
|
+
[default: scene]
|
|
149
|
+
|
|
150
|
+
Possible values:
|
|
151
|
+
- scene: A scene asset bundle, containing the original scenes filtered. Load using LoadScene
|
|
152
|
+
- asset: An asset bundle containing individual assets you can load using LoadAsset. The objects are copied from the original level files
|
|
153
|
+
- asset-shallow: An asset bundle containing individual assets you can load using LoadAsset. The bundle is completely empty, and only references the original game level files
|
|
154
|
+
|
|
155
|
+
--disable
|
|
156
|
+
When true, all gameobjects in the scene will start out disabled
|
|
157
|
+
|
|
158
|
+
--compression <COMPRESSION>
|
|
159
|
+
Compression level to apply
|
|
160
|
+
|
|
161
|
+
[default: lzma]
|
|
162
|
+
|
|
163
|
+
Possible values:
|
|
164
|
+
- none
|
|
165
|
+
- lzma
|
|
166
|
+
- lz4hc: Best compression at the cost of speed
|
|
167
|
+
|
|
168
|
+
-o, --output <OUTPUT>
|
|
169
|
+
[default: out.unity3d]
|
|
170
|
+
|
|
171
|
+
--bundle-name <BUNDLE_NAME>
|
|
172
|
+
Name to give the assetbundle. Should be unique for your game
|
|
173
|
+
```
|