atenfyr/UAssetAPI

Why not use Commandlet?

Closed this issue · 4 comments

If we want to parse uasset/uexp, we can use commandlets to write scripts. Why doesn't the author use commandlets to provide better compatibility, instead of rewriting the parsing method themselves?

I want to know the reason,sincerely!

Do you have some examples in mind?

Do you have some examples in mind?
For example, to load a uasset and get a list of all UObject properties, we can use the commandlet to utilize the UE engine's own LoadPackage function and then iterate through the properties of the objects using FObjectIterator. I want to know your reason of build this API.

In theory, I don't see why you couldn't use a UE commandlet to accomplish some similar goals (although I've never attempted such a thing), but there are some drawbacks that I could potentially see with such a solution:

  • You would need to re-compile and re-distribute the commandlet for every different game, because you would need to replicate game-specific classes in the editor to properly parse assets that use them. For many games, you would also need to modify the serialization source code yourself to accomodate for engine modifications. UAssetAPI is a generic solution that allows parsing .uasset files across a wide variety of versions with as little additional setup as possible.
  • You would need to distribute (or otherwise have users compile) the full Unreal editor to use the commandlet, which would lead to a large distribution size, making modding less accessible for the public. The Unreal editor also naturally consumes more resources than UAssetAPI/GUI does.
  • You would likely need to provide the commandlet access to all game assets for parsing to succeed. UAssetAPI supports parsing individual loose assets in isolation when possible, thanks to how low-level it is.

UAssetAPI helps to make modding quicker and more accessible to the public by avoiding these issues.