Files
UnrealEngineUWP/Engine/Source/Developer/BlueprintNativeCodeGen/Private/NativeCodeGenerationTool.cpp
Phillip Kavan 5f94a9f078 Allow nativized Blueprint types to instance other nativized Blueprint types as subobjects when they have one or more non-Blueprint asset preload dependencies (e.g. non-native UMG widgets).
Change summary:
- Added a shared cache to FGatherConvertedClassDependencies. The ctor is now protected and access is done through the static Get() method. This prevents redundant dependency list gathering for a previously-queried class/struct type.
- Switched FGatherConvertedClassDependencies::Assets from a TArray to a TSet (for consistency w/ the other dependency lists).
- Added FGatherConvertedClassDependenciesHelperBase::AddAssetDependency() to consolidate the addition of non-converted type asset dependencies (for consistency and easier maintenance).
- Added FGatherConvertedClassDependencies::GatherAssetsReferencedByConvertedTypes() as a utility method for building a nested asset dependency chain when converted subobject types are involved.
- Modified FFakeImportTableHelper::GetClassesOfSubobjects() to flag nested asset dependencies as CDO preload dependencies for EDL on the outermost converted type. This ensures dependencies will be loaded prior to CDO construction before instancing subobjects of a converted class type.
- Modified FGatherConvertedClassDependencies::AllDependencies() to include nested asset dependencies; this ensures they're included when we're generating the code needed to support the linker's "fake" export table at runtime.
- Some misc. cleanup; replaced a few instances of 'auto' with explicit types and updated a few lambda capture lists in place of previous use of '&' as a catch-all.

#jira UE-62514
#rb Dan.OConnor

[CL 4541116 by Phillip Kavan in Dev-Framework branch]
2018-11-05 15:55:31 -05:00

11 KiB