13 #include "DomainRandomizationDNNPCH.h"
14 #include "RandomComponentBase.h"
16 #include "RandomMaterialComponent.generated.h"
22 UCLASS(Blueprintable, ClassGroup = (NVIDIA), meta = (BlueprintSpawnableComponent))
32 virtual void BeginPlay()
override;
33 virtual void OnRandomization_Implementation()
override;
35 #if WITH_EDITORONLY_DATA
36 virtual void PostEditChangeProperty(
struct FPropertyChangedEvent& PropertyChangedEvent)
override;
37 #endif //WITH_EDITORONLY_DATA
39 bool HasMaterialToRandomize()
const;
41 class UMaterialInterface* GetNextMaterial();
44 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Randomization, meta = (ShowOnlyInnerProperties))
47 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Randomization)
48 bool bUseAllMaterialInDirectories;
50 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Randomization)
51 EAffectedMaterialOwnerComponentType AffectedComponentType;
54 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Randomization, meta = (EditCondition =
"bUseAllMaterialInDirectories", RelativeToGameContentDir))
55 TArray<FDirectoryPath> MaterialDirectories;
58 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Randomization, meta = (EditCondition =
"!bUseAllMaterialInDirectories"))
59 TArray<UMaterialInterface*> MaterialList;
64 TArray<class UMeshComponent*> OwnerMeshComponents;
67 TArray<class UDecalComponent*> OwnerDecalComponents;