I see recent changes to the FastGeo plugin moved classes so we can subclass them and use them more easily, thank you for that. I have some additional small requests for adding extensibility.
Can you make UFastGeoWorldPartitionRuntimeCellTransformer::Transform not be final? This can let us add our own filtering to a sub-class before calling Super::Transform(InLevel).
Can you make all the TSubclassOf<> properties use meta=(AllowAbstract) for better class filtering?
2- I agree, I will change this and let you know when it’s in (with CL).
1- The reason why it was initially set final was because there is a lot going on in that function and custom filtering should be possible by overriding these:
/** Whether the actor can be processed by the transformer. */
virtual bool IsActorTransformable(AActor* InActor, FString& OutReason) const { return true; }
/** Whether the component can be processed by the transformer. */
virtual bool IsComponentTransformable(UPrimitiveComponent* InComponent, FString& OutReason) const { return true; }
/** Whether the fully transformed actor can be deleted by the transformer. */
virtual bool IsFullyTransformedActorDeletable(AActor* InActor, FString& OutReason) const { return true; }
Let me know why these are not sufficient and I will be glad to add what’s missing.
My use case is to apply filtering on the ULevel. IsActorTransformable does work, but I have to iterate on every actor which is just extra work. The filtering I am doing is to only allow the transformer to run on certain grid names. This is the code I have if you wanted to add that directly instead, could also add an exclusion list as well.
const auto StreamingCell = CastChecked<UWorldPartitionRuntimeLevelStreamingCell>(InActor->GetLevel()->GetWorldPartitionRuntimeCell());
if (!StreamingCell->RuntimeCellData || (!GridsToApplyTransformer.IsEmpty() && !GridsToApplyTransformer.Contains(StreamingCell->RuntimeCellData->GridName)))
{
return false;
}
I am fine with overriding IsActorTransformable for this if we need. Its not a huge deal.