Download

[Question] Async Loading | How to get Size of Package being loaded?

In my case the packages are streaming levels, here I need to check the total progress of loading.
The percentage of individual packages/levels can be read with GetAsyncLoadPercentage, but in order to get an accurate total result I would need the size of each package.

Is there a similar function that returns Package FileSize?

If you follow the source code of GetAsyncLoadPercentage it will eventually search for the associated FAsyncPackage and call GetLoadPercentage on it. The percentage is actually based on the number of individual UObjects that have been loaded, so if you need the absolute number of those you may be able to get it by calling PackageObjLoaded.Num() on the FAsyncPackage (which is private though). That should get you started at least, you can see for yourself in AsyncLoading.h and AsyncLoading.cpp.

Hopefully it can be achieved without modifying source code (as this would be a non-starter in my case).