Navigation
API > API/Runtime > API/Runtime/Foliage
Inheritance Hierarchy
- AISMPartitionActor
- AInstancedFoliageActor
References
| Module | Foliage |
| Header | /Engine/Source/Runtime/Foliage/Public/InstancedFoliageActor.h |
| Include | #include "InstancedFoliageActor.h" |
Syntax
UCLASS (NotPlaceable, HideCategories=(Object, Rendering, Mobility), MinimalAPI, NotBlueprintable)
class AInstancedFoliageActor : public AISMPartitionActor
Variables
| Type | Name | Description | |
|---|---|---|---|
| FFoliageInstanceBaseCache | InstanceBaseCache | Cross level references cache for instances base. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
AInstancedFoliageActor
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| TUniqueObj< FFoliageInfo > & | AddFoliageInfo
(
UFoliageType* FoliageType |
||
| TUniqueObj< FFoliageInfo > & | AddFoliageInfo
(
UFoliageType* FoliageType, |
||
| UFoliageType * | AddFoliageType
(
const UFoliageType* InType, |
||
| void | AddInstances
(
UObject* WorldContextObject, |
||
| FFoliageInfo * | AddMesh
(
UFoliageType* InType |
||
| FFoliageInfo * | AddMesh
(
UStaticMesh* InMesh, |
Add a new static mesh. | |
| void | AddReferencedObjects
(
UObject* InThis, |
||
| void | ApplySelection
(
bool bApply |
Propagate the selected instances to the actual foliage implementation. | |
| void | BeginDestroy () |
||
| bool | CanDeleteSelectedActor
(
FText& OutReason |
||
| bool | CanEditFoliageInstance
(
const FFoliageInstanceId& InstanceId |
||
| bool | CanMoveFoliageInstance
(
const FFoliageInstanceId& InstanceId, |
||
| bool | CheckCollisionWithWorld
(
const UWorld* InWorld, |
||
| void | |||
| bool | ContainsInstancesFromProceduralFoliageComponent
(
const FGuid& InProceduralGuid |
||
| bool | ContainsInstancesFromProceduralFoliageComponent
(
const UProceduralFoliageComponent* InProceduralFoliageComponent |
||
| void | DeclareConstructClasses
(
TArray< FTopLevelAssetPath >& OutConstructClasses, |
||
| bool | DeleteFoliageInstances
(
TArrayView< const FFoliageInstanceId > InstanceIds |
||
| bool | DeleteInstancesForAllProceduralFoliageComponents
(
bool bInRebuildTree |
||
| void | DeleteInstancesForComponent
(
UWorld* InWorld, |
Deletes the instances attached to a component, traverses all foliage actors in the world. | |
| void | DeleteInstancesForComponent
(
UActorComponent* InComponent, |
||
| void | DeleteInstancesForComponent
(
UActorComponent* InComponent |
Deletes the instances attached to a component. | |
| bool | DeleteInstancesForProceduralFoliageComponent
(
const FGuid& InProceduralGuid, |
||
| bool | DeleteInstancesForProceduralFoliageComponent
(
const UProceduralFoliageComponent* InProceduralFoliageComponent, |
Deletes the instances spawned by a procedural component. | |
| void | Destroyed () |
||
| void | |||
| bool | DuplicateFoliageInstances
(
TArrayView< const FFoliageInstanceId > InstanceIds, |
||
| void | |||
| void | ExitEditMode () |
||
| const UFoliageType * | FindFoliageType
(
const FFoliageInfo* InFoliageInfo |
Returns FoliageType associated to this FoliageInfo. | |
| FFoliageInfo * | FindFoliageTypeOfClass
(
TSubclassOf< UFoliageType_InstancedStaticMesh > Class |
||
| const FFoliageInfo * | FindInfo
(
const UFoliageType* InType |
Finds a mesh entry. | |
| FFoliageInfo * | FindInfo
(
const UFoliageType* InType |
Finds a mesh entry. | |
| FFoliageInfo * | FindOrAddMesh
(
UFoliageType* InType |
Finds a mesh entry or adds it if it doesn't already exist. | |
| bool | FoliageTrace
(
const UWorld* InWorld, |
||
| bool | ForEachFoliageInfo
(
TFunctionRef< bool(UFoliageType*FoliageType, FFoliageInfo&FoliageInfo)> InOperation |
||
| AInstancedFoliageActor * | Get
(
UWorld* InWorld, |
Get the instanced foliage actor for the specified params | |
| void | GetAllFoliageTypesForSource
(
const UObject* InSource, |
Performs a reverse lookup from a source object to all the foliage types that are currently using that object (includes assets and blueprint classes) | |
| TMap< UFoliageType *, FFoliageInfo * > | Will return all the foliage type used. | ||
| UActorComponent * | GetBaseComponentFromBaseId
(
const FFoliageInstanceBaseId& BaseId |
||
| AInstancedFoliageActor * | GetDefault
(
UWorld* InWorld |
||
| uint32 | GetDefaultGridSize
(
UWorld* InWorld |
||
| const TMap< UFoliageType *, TUniqueObj< FFoliageInfo > > & | |||
| bool | GetFoliageInstanceTransform
(
const FFoliageInstanceId& InstanceId, |
||
| UFoliageType * | GetFoliageTypeForInfo
(
const FFoliageInfo* FoliageInfo |
||
| AInstancedFoliageActor * | GetInstancedFoliageActorForCurrentLevel
(
const UWorld* InWorld, |
Get the instanced foliage actor for the current streaming level. | |
| AInstancedFoliageActor * | GetInstancedFoliageActorForLevel
(
ULevel* Level, |
Get the instanced foliage actor for the specified streaming level. | |
| TMap< UFoliageType *, TArray< const FFoliageInstancePlacementInfo * > > | GetInstancesForComponent
(
UActorComponent* InComponent |
Returns a map of Static Meshes and their placed instances attached to a component. | |
| UFoliageType * | GetLocalFoliageTypeForSource
(
const UObject* InSource, |
Performs a reverse lookup from a source object to a local foliage type (i.e. the foliage type owned exclusively by this IFA) | |
| int32 | GetOverlappingBoxCount
(
const UFoliageType* FoliageType, |
Finds the number of instances overlapping with the box. | |
| void | GetOverlappingBoxTransforms
(
const UFoliageType* FoliageType, |
Finds all instances in the provided box and get their transforms. | |
| void | GetOverlappingMeshCounts
(
const FSphere& Sphere, |
Perf Warnin: potentially slow! Dev-only use recommended. | |
| int32 | GetOverlappingSphereCount
(
const UFoliageType* FoliageType, |
Finds the number of instances overlapping with the sphere. | |
| TMap< UFoliageType *, FFoliageInfo * > | Will return all the foliage type used by currently selected instances. | ||
| FBox | Get the bounds of all selected instances. | ||
| bool | GetSelectionLocation
(
FBox& OutLocation |
Returns the location for the widget. | |
| ISMInstanceManager * | GetSMInstanceManager
(
const FSMInstanceId& InstanceId |
||
| void | HandleFoliageInstancePostMove
(
const FFoliageInstanceId& InstanceId |
||
| void | HandleFoliageInstancePreMove
(
const FFoliageInstanceId& InstanceId |
||
| bool | HasFoliageAttached
(
UActorComponent* InComponent |
Whether there any foliage instances painted on specified component | |
| bool | Whether actor has selected instances. | ||
| float | InternalTakeRadialDamage
(
float Damage, |
Default InternalTakeRadialDamage behavior finds and scales damage for the closest component which isn't appropriate for foliage. | |
| bool | |||
| bool | |||
| void | MapRebuild () |
Called in response to BSP rebuilds to migrate foliage from obsolete to new components. | |
| void | MoveAllInstancesToLevel
(
ULevel* InTargetLevel |
Move all instances to a foliage actor in target level. | |
| void | MoveInstancesForComponentToCurrentLevel
(
UActorComponent* InComponent |
Moves instances based on the specified component to the current streaming level. | |
| void | MoveInstancesForComponentToLevel
(
UActorComponent* InComponent, |
||
| void | MoveInstancesToLevel
(
ULevel* InTargetLevel, |
Move instances to a foliage actor in target level. | |
| void | MoveInstancesToNewComponent
(
UPrimitiveComponent* InOldComponent, |
Change all instances based on one component to a new component (possible in another level). | |
| void | MoveInstancesToNewComponent
(
UWorld* InWorld, |
||
| void | MoveInstancesToNewComponent
(
UWorld* InWorld, |
||
| void | MoveInstancesToNewComponent
(
UPrimitiveComponent* InOldComponent, |
||
| void | MoveSelectedInstancesToActorEditorContext
(
UWorld* InWorld |
||
| void | MoveSelectedInstancesToLevel
(
ULevel* InTargetLevel |
Move selected instances to a foliage actor in target level. | |
| void | NotifyFoliageInstanceMovementEnded
(
const FFoliageInstanceId& InstanceId |
||
| void | NotifyFoliageInstanceMovementOngoing
(
const FFoliageInstanceId& InstanceId |
||
| void | NotifyFoliageInstanceMovementStarted
(
const FFoliageInstanceId& InstanceId |
||
| void | NotifyFoliageInstanceSelectionChanged
(
const FFoliageInstanceId& InstanceId, |
||
| void | NotifyFoliageTypeChanged
(
UFoliageType* FoliageType, |
Called to notify InstancedFoliageActor that a UFoliageType has been modified | |
| void | NotifyFoliageTypeWillChange
(
UFoliageType* FoliageType |
||
| FOnFoliageTypeMeshChanged & | |||
| void | PostDuplicate
(
bool bDuplicateForPIE |
||
| void | PostEditUndo () |
||
| void | |||
| void | PostLoad () |
||
| void | PreEditUndo () |
||
| void | RemoveAllInstances
(
UObject* WorldContextObject, |
||
| void | RemoveBaseComponentOnFoliageTypeInstances
(
UFoliageType* FoliageType |
||
| bool | RemoveFoliageInfoAndCopyValue
(
UFoliageType* FoliageType, |
||
| void | RemoveFoliageType
(
UFoliageType** InFoliageType, |
Remove the FoliageType from the list, and all its instances. | |
| void | RepairDuplicateIFA
(
AInstancedFoliageActor* InDuplicateIFA |
Fix up a duplicate IFA | |
| void | We don't want to have our components automatically destroyed by the Blueprint code | ||
| bool | SelectInstance
(
AActor* InActor, |
Select an individual instance. | |
| void | SelectInstance
(
UInstancedStaticMeshComponent* InComponent, |
Select an individual instance. | |
| void | Serialize
(
FArchive& Ar |
||
| bool | SetFoliageInstanceTransform
(
const FFoliageInstanceId& InstanceId, |
||
| bool | ShouldExport () |
||
| bool | ShouldImport
(
FStringView ActorPropString, |
||
| bool | ShouldIncludeGridSizeInName
(
UWorld* InWorld, |
||
| void | UpdateInstancePartitioning
(
UWorld* InWorld |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FOnFoliageTypeMeshChanged |
Typedefs
| Name | Description |
|---|---|
| FOnInstanceCoundChanged | |
| FOnSelectionChanged | Delegate type for selection change events. |
Constants
| Name | Description |
|---|---|
| InstanceCountChanged | |
| SelectionChanged |