115 Commits

Author SHA1 Message Date
ds5678
5971480fa2 Use collection expressions 2025-09-17 09:57:47 -07:00
ds5678
2346035026 Remove unnecessary csproj properties
* IsTrimmable
* ImplicitUsings
* AppendTargetFrameworkToOutputPath
2025-09-17 09:44:05 -07:00
Jeremy Pritts
85172b7393
File system improvements (#1936)
* WIP file system improvements

* Switch to a hierarchial virtual file system

* EnumerateFiles and EnumerateDirectories

* Change import code to use FileSystem

* Use FileSystem when loading assemblies

* Use FileSystem in MonoManager initialization

* Remove set method for PlatformGameStructure::RootPath

* Renaming cleanup
2025-09-13 15:17:41 -07:00
Jeremy Pritts
01787539de Revert "Use NuGet central package management"
This reverts commit d26e81f74e83ca1294bee8c263c3419ad4aa2f38.
2025-09-07 16:40:25 -07:00
YoshiRulz
d26e81f74e Use NuGet central package management 2025-09-06 19:04:44 -07:00
ds5678
02eb6cf7f5 Update package versions across multiple projects
- Bump `System.Text.Json` to version `9.0.7` in `AssetRipper.GUI.Localizations.SourceGenerator.csproj`.
- Bump `Microsoft.AspNetCore.OpenApi` to version `9.0.7` in `AssetRipper.GUI.Web.csproj`.
- Bump `Swashbuckle.AspNetCore` to version `9.0.3` in `AssetRipper.GUI.Web.csproj`.
- Bump `ZstdSharp.Port` to version `0.8.6` in `AssetRipper.IO.Files.csproj`.
2025-07-24 18:54:10 -07:00
ds5678
88f6700ccd Export meta references on Unity 3 as type 1
* Reverts most of 70f21a0b7a3760b9ff41fcb3670e24d8a09ba7d9
* Resolves #1329
* Resolves #1827
2025-07-15 18:59:00 -07:00
ds5678
7b1c20c1f3 File scoped namespaces 2025-06-23 11:42:47 -07:00
dependabot[bot]
3ec12fad63
Bump NuGet references and support newer Unity versions (#1818)
* Bump AssetRipper.ICSharpCode.Decompiler and 9 others

Bumps AssetRipper.ICSharpCode.Decompiler to 9.1.0.8017
Bumps AssetRipper.SourceGenerated from 1.2.4 to 1.2.5
Bumps Microsoft.AspNetCore.OpenApi from 9.0.5 to 9.0.6
Bumps Microsoft.NET.Test.Sdk to 17.14.1
Bumps NUnit.Analyzers to 4.9.2
Bumps Samboy063.Cpp2IL.Core from 2022.1.0-development.1262 to 2022.1.0-pre-release.19
Bumps SharpCompress from 0.39.0 to 0.40.0
Bumps Swashbuckle.AspNetCore from 8.1.2 to 9.0.1
Bumps System.CommandLine to 2.0.0-beta5.25306.1
Bumps System.Text.Json from 9.0.5 to 9.0.6

---
updated-dependencies:
- dependency-name: AssetRipper.ICSharpCode.Decompiler
  dependency-version: 9.1.0.8017
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: AssetRipper.ICSharpCode.Decompiler
  dependency-version: 9.1.0.8017
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: AssetRipper.SourceGenerated
  dependency-version: 1.2.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Microsoft.AspNetCore.OpenApi
  dependency-version: 9.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 17.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 17.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 17.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 17.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 17.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 17.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 17.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: NUnit.Analyzers
  dependency-version: 4.9.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: NUnit.Analyzers
  dependency-version: 4.9.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: NUnit.Analyzers
  dependency-version: 4.9.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: NUnit.Analyzers
  dependency-version: 4.9.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: NUnit.Analyzers
  dependency-version: 4.9.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: NUnit.Analyzers
  dependency-version: 4.9.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: NUnit.Analyzers
  dependency-version: 4.9.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Samboy063.Cpp2IL.Core
  dependency-version: 2022.1.0-pre-release.19
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: SharpCompress
  dependency-version: 0.40.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Swashbuckle.AspNetCore
  dependency-version: 9.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: System.CommandLine
  dependency-version: 2.0.0-beta5.25306.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: System.CommandLine
  dependency-version: 2.0.0-beta5.25306.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: System.CommandLine
  dependency-version: 2.0.0-beta5.25306.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: System.Text.Json
  dependency-version: 9.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update Source/AssetRipper.Import/AssetRipper.Import.csproj

* Apply suggestions from code review

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Pritts <49847914+ds5678@users.noreply.github.com>
2025-06-20 00:07:13 -07:00
ds5678
477933b9ad Formatting 2025-06-18 12:42:22 -07:00
ds5678
70abe03a42 Ensure there are never too many characters in a file name
* Resolves #1535
* Closes #1797
2025-05-31 17:22:01 -07:00
ds5678
f85b6de5a5 Replace SmartEnums with new extensions feature 2025-05-18 12:01:53 -07:00
ds5678
980484e374 Support new versions of Unity and update NuGet references 2025-05-07 14:34:42 -07:00
ds5678
4c6c28e88b Refactoring
* Use preview language version
* Apply various code fixers
* Remove TypeTreeHelper
* Remove unused properties from IExportContainer
2025-04-29 11:31:02 -07:00
ds5678
5ffc04cfa5 Update AssetRipper.Primitives to 3.2.0 2025-04-28 21:05:36 -07:00
ds5678
cfd2d822c7 Smart enum generator 2025-03-30 22:42:03 -07:00
ds5678
8435c391bd Implement virtual file system
* Resolves #1579
2025-03-09 03:11:45 -07:00
ds5678
0125475c0a Be more strict about alignment 2025-03-01 18:31:47 -08:00
ds5678
f9ba652b09 Align if necessary when reading bundle metadata
* Resolves #1470
2025-03-01 18:16:12 -08:00
ds5678
32aaebbd2f Fix lighting data crash
* Resolves #1454
* Resolves #811
* Related: #1628
* Related: #1012
* Related: #592
* Related: #1496
2025-02-27 23:56:01 -08:00
dependabot[bot]
e2425d73ad Bump ZstdSharp.Port from 0.8.4 to 0.8.5
Bumps [ZstdSharp.Port](https://github.com/oleg-st/ZstdSharp) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/oleg-st/ZstdSharp/releases)
- [Commits](https://github.com/oleg-st/ZstdSharp/compare/0.8.4...0.8.5)

---
updated-dependencies:
- dependency-name: ZstdSharp.Port
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-27 04:46:09 -05:00
ds5678
d6d1852d0f Update AssetRipper.IO.Endian package version
Updated the `AssetRipper.IO.Endian` package from version
`2.0.1` to `2.0.2` in both the
`AssetRipper.IO.Files.SourceGenerator.csproj` and
`AssetRipper.IO.Files.csproj` files.
2025-02-26 11:33:43 -08:00
ds5678
3fe9f4724d Update package references
- Removed `AssetRipper.Text.SourceGeneration` reference from `AssetRipper.GUI.Localizations.csproj`.
- Updated `AssetRipper.IO.Endian` package version from `2.0.0` to `2.0.1` in both `AssetRipper.IO.Files.SourceGenerator.csproj` and `AssetRipper.IO.Files.csproj`.
2025-02-26 09:58:55 -08:00
ds5678
b489c3d805 Improve recovery of Il2Cpp explicit interface overrides
* Resolves #1682
2025-02-24 16:12:22 -08:00
dependabot[bot]
1fdf7c65aa Bump AssetRipper.Primitives from 3.1.4 to 3.1.5
Bumps [AssetRipper.Primitives](https://github.com/AssetRipper/AssetRipper.Primitives) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/AssetRipper/AssetRipper.Primitives/releases)
- [Commits](https://github.com/AssetRipper/AssetRipper.Primitives/compare/3.1.4...3.1.5)

---
updated-dependencies:
- dependency-name: AssetRipper.Primitives
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-15 02:26:33 -05:00
ds5678
26804af466 Update AssetRipper.IO.Endian package version
Updated the `AssetRipper.IO.Endian` package from version
`1.1.0` to `2.0.0` in both the
`AssetRipper.IO.Files.SourceGenerator.csproj` and
`AssetRipper.IO.Files.csproj` files.
2025-02-11 18:34:26 -08:00
dependabot[bot]
f78ede0fb3 Bump SharpCompress and ZstdSharp.Port
Bumps [SharpCompress](https://github.com/adamhathcock/sharpcompress) and [ZstdSharp.Port](https://github.com/oleg-st/ZstdSharp). These dependencies needed to be updated together.

Updates `SharpCompress` from 0.38.0 to 0.39.0
- [Release notes](https://github.com/adamhathcock/sharpcompress/releases)
- [Commits](https://github.com/adamhathcock/sharpcompress/compare/0.38.0...0.39.0)

Updates `ZstdSharp.Port` from 0.8.4 to 0.8.4
- [Release notes](https://github.com/oleg-st/ZstdSharp/releases)
- [Commits](https://github.com/oleg-st/ZstdSharp/compare/0.8.4...0.8.4)

---
updated-dependencies:
- dependency-name: SharpCompress
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: ZstdSharp.Port
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-16 20:28:50 -05:00
dependabot[bot]
24ffe1bee4 Bump AssetRipper.Primitives from 3.1.3 to 3.1.4
Bumps [AssetRipper.Primitives](https://github.com/AssetRipper/AssetRipper.Primitives) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/AssetRipper/AssetRipper.Primitives/releases)
- [Commits](https://github.com/AssetRipper/AssetRipper.Primitives/compare/3.1.3...3.1.4)

---
updated-dependencies:
- dependency-name: AssetRipper.Primitives
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-21 23:01:48 -08:00
dependabot[bot]
95024da309 Bump ZstdSharp.Port from 0.8.3 to 0.8.4
Bumps [ZstdSharp.Port](https://github.com/oleg-st/ZstdSharp) from 0.8.3 to 0.8.4.
- [Release notes](https://github.com/oleg-st/ZstdSharp/releases)
- [Commits](https://github.com/oleg-st/ZstdSharp/compare/0.8.3...0.8.4)

---
updated-dependencies:
- dependency-name: ZstdSharp.Port
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-15 22:15:15 -08:00
ds5678
6dce1c375c Abstract File System Access During Export
* Resolves #665
2024-12-05 21:39:52 -08:00
ds5678
7d197aa446 Move Hash128 2024-12-04 11:07:42 -08:00
ds5678
9cdc240858 Replace Path.Combine with Path.Join 2024-12-04 09:47:56 -08:00
dependabot[bot]
b899b6e3a3 Bump ZstdSharp.Port from 0.8.2 to 0.8.3
Bumps [ZstdSharp.Port](https://github.com/oleg-st/ZstdSharp) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/oleg-st/ZstdSharp/releases)
- [Commits](https://github.com/oleg-st/ZstdSharp/compare/0.8.2...0.8.3)

---
updated-dependencies:
- dependency-name: ZstdSharp.Port
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-24 18:32:21 -08:00
dependabot[bot]
4c1f890a4f Bump ZstdSharp.Port from 0.8.1 to 0.8.2
Bumps [ZstdSharp.Port](https://github.com/oleg-st/ZstdSharp) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/oleg-st/ZstdSharp/releases)
- [Commits](https://github.com/oleg-st/ZstdSharp/compare/0.8.1...0.8.2)

---
updated-dependencies:
- dependency-name: ZstdSharp.Port
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-13 17:58:12 -08:00
dependabot[bot]
1541a68da7 Bump SharpCompress from 0.37.2 to 0.38.0
Bumps [SharpCompress](https://github.com/adamhathcock/sharpcompress) from 0.37.2 to 0.38.0.
- [Release notes](https://github.com/adamhathcock/sharpcompress/releases)
- [Commits](https://github.com/adamhathcock/sharpcompress/compare/0.37.2...0.38.0)

---
updated-dependencies:
- dependency-name: SharpCompress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-02 18:56:08 -07:00
ds5678
8429911c25 Handle failed file loading
* Closes #1208
* Related: #1403
2024-08-11 11:17:30 -07:00
dependabot[bot]
a5cd6d3ad6 Bump AssetRipper.Primitives from 3.1.2 to 3.1.3
Bumps [AssetRipper.Primitives](https://github.com/AssetRipper/AssetRipper.Primitives) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/AssetRipper/AssetRipper.Primitives/releases)
- [Commits](https://github.com/AssetRipper/AssetRipper.Primitives/compare/3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: AssetRipper.Primitives
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-09 21:35:27 -07:00
ds5678
2e4ce635d0 Reduce allocations for UTF8 truncation
* Resolves #1424
2024-07-29 21:35:43 -07:00
Jakob Hellermann
716a07f50b
fix file name truncation in presence of non-ascii characters (#1402)
* fix file name truncation in presence of non-ascii characters

* review: remove unnecessary -4 of maxNameLength

* review: count byte length of extension

* review: fix typo three -> four

* review: rename byteLength -> maxLength

* review: fix case where last character is incorrectly truncated

* Add some unit tests
2024-07-10 20:04:52 -07:00
ds5678
0d994ae697 Fix max file name length
* Resolves #1372
2024-06-29 16:03:00 -07:00
dependabot[bot]
670e92cbc3 Bump AssetRipper.Primitives from 3.1.1 to 3.1.2
Bumps [AssetRipper.Primitives](https://github.com/AssetRipper/AssetRipper.Primitives) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/AssetRipper/AssetRipper.Primitives/releases)
- [Commits](https://github.com/AssetRipper/AssetRipper.Primitives/compare/3.1.1...3.1.2)

---
updated-dependencies:
- dependency-name: AssetRipper.Primitives
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-02 21:35:57 -04:00
ds5678
afd9c713aa Move AssetRipper.IO.Endian to its own repository
* Related: #1094
2024-05-27 10:18:01 -07:00
ds5678
1b4ece2b2d Rework creation of temporary files and directories
* Temporary folder under AssetRipper is unique to allow multiple instances.
* SmartStream now uses this folder too
2024-05-25 13:46:30 -07:00
wd357dui
2c2769ed79
fix alignment and missing script types for writing of SerializedFile (#1365)
* fix alignment and missing script types for writing of `SerializedFile`

for the `Write` method of `SerializedFile`:
 - add script types
 - `objectDataPosition` is aligned to 16 bytes
 - each object data is aligned to 8 bytes

Tested by reading and writing back (replacing) a game's `globalgamemanagers.assets` file (the game has unity version `2022.3.6f1`); with those script types and alignments changes the game won't crash on startup anymore

* fix alignment and missing script types for writing of `SerializedFile`
2024-05-24 14:28:28 -07:00
dependabot[bot]
46588a64cb Bump ZstdSharp.Port from 0.8.0 to 0.8.1
Bumps [ZstdSharp.Port](https://github.com/oleg-st/ZstdSharp) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/oleg-st/ZstdSharp/releases)
- [Commits](https://github.com/oleg-st/ZstdSharp/compare/0.8.0...0.8.1)

---
updated-dependencies:
- dependency-name: ZstdSharp.Port
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-19 18:14:01 -04:00
dependabot[bot]
c2463c765e Bump AssetRipper.Primitives from 3.1.0 to 3.1.1
Bumps [AssetRipper.Primitives](https://github.com/AssetRipper/AssetRipper.Primitives) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/AssetRipper/AssetRipper.Primitives/releases)
- [Commits](https://github.com/AssetRipper/AssetRipper.Primitives/compare/3.1.0...3.1.1)

---
updated-dependencies:
- dependency-name: AssetRipper.Primitives
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-19 18:08:25 -04:00
GameTechGuides
5b87c961b6
Replace commas, brackets, and control characters with underscores (#1345)
* Sanitize filenames to exclude commas, brackets, and control characters

* Add Missing Things
2024-05-18 12:21:32 -04:00
ds5678
c33b69976c Type Tree Deserialization Improvements:
* Proper support for stream alignment
* Use unchecked casts when writing and walking
* Support CopyValues from different SerializableType
* Remove duplicate serializedVersion
* Ensure proper type name is used for array-like fields
* Support creating Unity class release and editor trees from the embedded Tpk
* Support Unity 3 named vector nodes
* Resolves #1328
2024-05-07 20:00:49 -07:00
dependabot[bot]
4c7e140079 Bump SharpCompress from 0.36.0 to 0.37.2
Bumps [SharpCompress](https://github.com/adamhathcock/sharpcompress) from 0.36.0 to 0.37.2.
- [Release notes](https://github.com/adamhathcock/sharpcompress/releases)
- [Commits](https://github.com/adamhathcock/sharpcompress/compare/0.36.0...0.37.2)

---
updated-dependencies:
- dependency-name: SharpCompress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-27 09:43:51 -07:00
dependabot[bot]
4f4f67d07d Bump ZstdSharp.Port from 0.7.6 to 0.8.0
Bumps [ZstdSharp.Port](https://github.com/oleg-st/ZstdSharp) from 0.7.6 to 0.8.0.
- [Release notes](https://github.com/oleg-st/ZstdSharp/releases)
- [Commits](https://github.com/oleg-st/ZstdSharp/compare/0.7.6...0.8.0)

---
updated-dependencies:
- dependency-name: ZstdSharp.Port
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-27 09:39:56 -07:00