UE5.0 does not support ActorFoliage at Levels where World Partition is enabled ( [Link Removed] ), but ActorFoliage will work via ProceduralFoliageVolume. And when you cook the level you will get an error, so it doesn't work properly with the package.
In addition, this Actor Foliage will be added illegally to Foliage Mode.
UnrealEditor-Foliage-Win64-Debug.dll!AInstancedFoliageActor::AddFoliageType(const UFoliageType * InType, FFoliageInfo * * OutInfo) Line 3575 C++ UnrealEditor-FoliageEdit-Win64-Debug.dll!FEdModeFoliage::AddInstancesImp(UWorld * InWorld, const UFoliageType * Settings, const TArray<FDesiredFoliageInstance,TSizedDefaultAllocator<32>> & DesiredInstances, const TArray<int,TSizedDefaultAllocator<32>> & ExistingInstanceBuckets, const float Pressure, TMap<FName,TMap<ULandscapeComponent *,TArray<unsigned char,TSizedDefaultAllocator<32>>,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<ULandscapeComponent *,TArray<unsigned char,TSizedDefaultAllocator<32>>,0>>,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<FName,TMap<ULandscapeComponent *,TArray<unsigned char,TSizedDefaultAllocator<32>>,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<ULandscapeComponent *,TArray<unsigned char,TSizedDefaultAllocator<32>>,0>>,0>> * LandscapeLayerCachesPtr, const FFoliageUISettings * UISettings, const FFoliagePaintingGeometryFilter * OverrideGeometryFilter, bool InRebuildFoliageTree) Line 1464 C++ UnrealEditor-FoliageEdit-Win64-Debug.dll!FEdModeFoliage::AddInstances(UWorld * InWorld, const TArray<FDesiredFoliageInstance,TSizedDefaultAllocator<32>> & DesiredInstances, const FFoliagePaintingGeometryFilter & OverrideGeometryFilter, bool InRebuildFoliageTree) Line 1349 C++ UnrealEditor-FoliageEdit-Win64-Debug.dll!UProceduralFoliageEditorLibrary::ResimulateProceduralFoliageComponents::__l7::<lambda>(const TArray<FDesiredFoliageInstance,TSizedDefaultAllocator<32>> & DesiredFoliageInstances) Line 67 C++ UnrealEditor-FoliageEdit-Win64-Debug.dll!UE::Core::Private::Function::TFunctionRefCaller<void <lambda>(const TArray<FDesiredFoliageInstance,TSizedDefaultAllocator<32>> &),void __cdecl(TArray<FDesiredFoliageInstance,TSizedDefaultAllocator<32>> const &)>::Call(void * Obj, const TArray<FDesiredFoliageInstance,TSizedDefaultAllocator<32>> & <Params_0>) Line 549 C++ UnrealEditor-Foliage-Win64-Debug.dll!UProceduralFoliageComponent::ResimulateProceduralFoliage(TFunctionRef<void __cdecl(TArray<FDesiredFoliageInstance,TSizedDefaultAllocator<32>> const &)> AddInstancesFunc) Line 311 C++ UnrealEditor-FoliageEdit-Win64-Debug.dll!UProceduralFoliageEditorLibrary::ResimulateProceduralFoliageComponents(const TArray<UProceduralFoliageComponent *,TSizedDefaultAllocator<32>> & ProceduralFoliageComponents) Line 58 C++ UnrealEditor-FoliageEdit-Win64-Debug.dll!FProceduralFoliageComponentDetails::OnResimulateClicked() Line 107 C++ UnrealEditor-FoliageEdit-Win64-Debug.dll!UE::Core::Private::Tuple::TTupleBase<TIntegerSequence<unsigned int>>::ApplyAfter<FReply (__cdecl FProceduralFoliageComponentDetails::*const &)(void),FProceduralFoliageComponentDetails * &>(FReply(FProceduralFoliageComponentDetails::*)() & Func, FProceduralFoliageComponentDetails * & <Args_0>) Line 324 C++ UnrealEditor-FoliageEdit-Win64-Debug.dll!TBaseSPMethodDelegateInstance<0,FProceduralFoliageComponentDetails,1,FReply __cdecl(void),FDefaultDelegateUserPolicy>::Execute() Line 290 C++ UnrealEditor-Slate-Win64-Debug.dll!SButton::ExecuteOnClick() Line 464 C++
To solve this problem, we need to add a filter to the Procedural Foliage Volume, like the SFoliagePalette.
EActiveTimerReturnType SFoliagePalette::UpdatePaletteItems(double InCurrentTime, float InDeltaTime) { if (bItemsNeedRebuild) { bItemsNeedRebuild = false; // Cache the currently selected items auto ActiveViewWidget = GetActiveViewWidget(); TArray<FFoliagePaletteItemModelPtr> PreviouslySelectedItems = ActiveViewWidget->GetSelectedItems(); ActiveViewWidget->ClearSelection(); // Rebuild the list of palette items const auto& AllTypesList = FoliageEditMode->GetFoliageMeshList(); PaletteItems.Empty(AllTypesList.Num()); for (const FFoliageMeshUIInfoPtr& TypeInfo : AllTypesList) { PaletteItems.Add(MakeShareable(new FFoliagePaletteItemModel(TypeInfo, SharedThis(this), ThumbnailPool, FoliageEditMode))); } ... } TArray<FFoliageMeshUIInfoPtr>& FEdModeFoliage::GetFoliageMeshList() { return FoliageMeshList; }
expect : Actor foliage does not work
result : Actor foliage work
UnrealEditor-CoreUObject-Win64-Debug.dll!FScopedObjectFlagMarker::RestoreObjectFlags() Line 3589 C++
UnrealEditor-CoreUObject-Win64-Debug.dll!IsReferenced(UObject * & Obj, EObjectFlags KeepFlags, EInternalObjectFlags InternalKeepFlags, bool bCheckSubObjects, FReferencerInformationList * FoundReferences) Line 4116 C++
> UnrealEditor-CoreUObject-Win64-Debug.dll!SavePackageUtilities::FindMostLikelyCulprit(const TArray<UObject *,TSizedDefaultAllocator<32>> & BadObjects, UObject * & MostLikelyCulprit, FString & OutReferencer, FSaveContext * InOptionalSaveContext) Line 571 C++
UnrealEditor-CoreUObject-Win64-Debug.dll!`anonymous namespace'::ValidateIllegalReferences(FSaveContext & SaveContext, TArray<UObject *,TSizedDefaultAllocator<32>> & PrivateObjects, TArray<UObject *,TSizedDefaultAllocator<32>> & ObjectsInOtherMaps) Line 585 C++
UnrealEditor-CoreUObject-Win64-Debug.dll!`anonymous namespace'::ValidateImports(FSaveContext & SaveContext) Line 755 C++
UnrealEditor-CoreUObject-Win64-Debug.dll!`anonymous namespace'::SaveHarvestedRealms(FSaveContext & SaveContext, ESaveRealm HarvestingContextToSave) Line 2146 C++
UnrealEditor-CoreUObject-Win64-Debug.dll!`anonymous namespace'::InnerSave(FSaveContext & SaveContext) Line 2349 C++
UnrealEditor-CoreUObject-Win64-Debug.dll!UPackage::Save2(UPackage * InPackage, UObject * InAsset, const wchar_t * InFilename, const FSavePackageArgs & SaveArgs) Line 2499 C++
UnrealEditor-CoreUObject-Win64-Debug.dll!UPackage::Save(UPackage * InOuter, UObject * InAsset, const wchar_t * Filename, const FSavePackageArgs & SaveArgs) Line 1789 C++
UnrealEditor-UnrealEd-Win64-Debug.dll!UEditorEngine::Save(UPackage * InOuter, UObject * InAsset, const wchar_t * Filename, const FSavePackageArgs & InSaveArgs) Line 4383 C++
UnrealEditor-UnrealEd-Win64-Debug.dll!UCookOnTheFlyServer::SaveCookedPackage(UE::Cook::FSaveCookedPackageContext & Context) Line 4031 C++
UnrealEditor-UnrealEd-Win64-Debug.dll!UCookOnTheFlyServer::PumpSaves(UE::Cook::FTickStackData & StackData, unsigned int DesiredQueueLength, int & OutNumPushed, bool & bOutBusy) Line 3184 C++
UnrealEditor-UnrealEd-Win64-Debug.dll!UCookOnTheFlyServer::TickCookOnTheSide(const float TimeSlice, unsigned int & CookedPackageCount, ECookTickFlags TickFlags) Line 1297 C++
UnrealEditor-UnrealEd-Win64-Debug.dll!UCookCommandlet::CookByTheBook(const TArray<ITargetPlatform *,TSizedDefaultAllocator<32>> & Platforms) Line 1048 C++
UnrealEditor-UnrealEd-Win64-Debug.dll!UCookCommandlet::Main(const FString & CmdLineParams) Line 685 C++
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-157790 in the post.
1 |
Component | UE - World Creation - Worldbuilding Tools - Foliage |
---|---|
Affects Versions | 5.0 |
Target Fix | 5.6 |
Created | Jun 28, 2022 |
---|---|
Updated | Oct 11, 2024 |