Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions CustomImplementations/Buildables/FGBuildable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ void AFGBuildable::OnConstruction(const FTransform& transform) {
Super::OnConstruction(transform);

#if WITH_EDITOR
RemoveInstances();
RemoveInstances_Native();
CallSetupInstances();
const UWorld* World = GetWorld();
if (IsValid(World) and World->IsGameWorld()) {
// Don't do this for non-game worlds, otherwise the editor crashes when compiling a blueprint
RemoveInstances();
RemoveInstances_Native();
CallSetupInstances();
}
#endif
}
TArray<struct FInstanceData> AFGBuildable::GetActorLightweightInstanceData_Implementation() {
Expand Down