8#include "CoreMinimal.h"
9#include "GameFramework/Actor.h"
13#include "InstancedRendererManager.generated.h"
28 virtual void BeginPlay()
override;
30 virtual void EndPlay(
const EEndPlayReason::Type EndPlayReason)
override;
35 UFUNCTION(BlueprintCallable)
41 UFUNCTION(BlueprintCallable, Category =
"Instanced Renderer Manager")
42 bool AppendISM(UInstancedStaticMeshComponent* ISM);
48 UFUNCTION(BlueprintCallable, Category =
"Instanced Renderer Manager")
49 bool AppendOrCreateISM(UInstancedStaticMeshComponent* ISM);
54 UFUNCTION(BlueprintCallable, Category =
"Instanced Renderer Manager")
55 void SpawnAllInstancesBackToActors();
64 UFUNCTION(BlueprintCallable, Category =
"Instanced Renderer")
65 bool SpawnInstanceBackToActor(UInstancedStaticMeshComponent* ISM, int32 Index,
bool OnlyTree);
67 UFUNCTION(BlueprintCallable, Category =
"Instanced Renderer")
68 void ExportTreesAsCSV();
76 void DestroyOverlappingInstancesBox(UInstancedStaticMeshComponent* ISM, FBox AreaBox,
bool OnlyTrees);
81 void SetInstancedRendering(
bool Visible);
83 UFUNCTION(BlueprintCallable,Category =
"Instanced Renderer Manager")
84 TArray<AInstancedActorRenderer*> GetAllInstancedActorRendererActors()
const;
86 UFUNCTION(BlueprintPure, Category =
"Instanced Renderer Manager")
87 int32 GetTotalInstanceCount();
91 UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
94 UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
95 int32 TotalInstanceCount = 0;