Search Issue Tracker
Under Consideration for 1.7.X
Found in [Package]
Large amount of memory used in AOT Prebuild
When Visual Scripting creates the AOT stubs during a build, it loads every asset in the game to check if the main object inherits from IAotStubbable. This results in huge memory usage in large projects (in our case, it often causes a crash on a PC with 64GB of RAM)
There's a trivial code fix which is that you can check the asset type *without* loading the asset.
In AssetUtility.cs, replace GetAllAssetsOfType<T> with this version:
public static IEnumerable<T> GetAllAssetsOfType<T>()
// GetAllAssetPaths is undocumented and sometimes returns
// paths that are outside the assets folder, hence the where filter.
var result = AssetDatabase.GetAllAssetPaths()
.Where(p => p.StartsWith("Assets"))
.Where(p => typeof(T).IsAssignableFrom(AssetDatabase.GetMainAssetTypeAtPath(p)))
This both reduces the memory usage, and improves the performance.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- When the project name contains a ";" character, the editor crashes while creating a script.
- New Cubemap is inserted at the end of the array when baking an individual Probe
- Crash on GfxTaskExecutorD3D12::AddRequiredResourceBarriers when opening the project
- WebGL build fails with a UnicodeDecodeError
- MSB3073 error is thrown when building App Packages in Visual Studio