Navigation
API > API/Runtime > API/Runtime/Foliage
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- AActor
- APartitionActor
- AISMPartitionActor
- AInstancedFoliageActor
References
| Module | Foliage |
| Header | /Engine/Source/Runtime/Foliage/Public/InstancedFoliageActor.h |
| Include | #include "InstancedFoliageActor.h" |
Syntax
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 |
Add a new static mesh. | |
| 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. | |
| 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, |
Deletes the instances attached to a component. | |
| void | DeleteInstancesForComponent
(
UActorComponent* InComponent |
Deletes the instances attached to a component. | |
| bool | DeleteInstancesForProceduralFoliageComponent
(
const FGuid& InProceduralGuid, |
Deletes the instances spawned by a procedural component. | |
| bool | DeleteInstancesForProceduralFoliageComponent
(
const UProceduralFoliageComponent* InProceduralFoliageComponent, |
Deletes the instances spawned by a procedural component. | |
| void | |||
| bool | DuplicateFoliageInstances
(
TArrayView< const FFoliageInstanceId > InstanceIds, |
||
| void | |||
| void | ExitEditMode () |
||
| const UFoliageType * | FindFoliageType
(
const FFoliageInfo* InFoliageInfo |
Returns FoliageType associated to this FoliageInfo. | |
| FFoliageInfo * | |||
| 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 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 |
||
| 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. | |
| 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. | ||
| 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
(
UWorld* InWorld, |
Change all instances based on one component to a new component (possible in another level). | |
| void | MoveInstancesToNewComponent
(
UWorld* InWorld, |
Change all instances based on one component to a new component (possible in another level). | |
| void | MoveInstancesToNewComponent
(
UPrimitiveComponent* InOldComponent, |
Change all instances based on one component to a new component (possible in another level). | |
| void | MoveInstancesToNewComponent
(
UPrimitiveComponent* InOldComponent, |
Change all instances based on one component to a new component (possible in another level). | |
| 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 | 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 | |
| bool | SelectInstance
(
AActor* InActor, |
Select an individual instance. | |
| void | SelectInstance
(
UInstancedStaticMeshComponent* InComponent, |
Select an individual instance. | |
| bool | SetFoliageInstanceTransform
(
const FFoliageInstanceId& InstanceId, |
||
| void | UpdateInstancePartitioning
(
UWorld* InWorld |
Overridden from APartitionActor
| Type | Name | Description | |
|---|---|---|---|
| uint32 | GetDefaultGridSize
(
UWorld* InWorld |
||
| bool | ShouldIncludeGridSizeInName
(
UWorld* InWorld, |
Overridden from AActor
| Type | Name | Description | |
|---|---|---|---|
| bool | CanDeleteSelectedActor
(
FText& OutReason |
When selected can this actor be deleted? | |
| void | Destroyed () |
Called when this actor is explicitly being destroyed during gameplay or in the editor, not called during level streaming or gameplay ending | |
| float | InternalTakeRadialDamage
(
float Damage, |
Default InternalTakeRadialDamage behavior finds and scales damage for the closest component which isn't appropriate for foliage. | |
| bool | Indicates whether this actor should participate in level bounds calculations | ||
| bool | Returns true if this actor should be shown in the scene outliner | ||
| void | We don't want to have our components automatically destroyed by the Blueprint code | ||
| bool | ShouldExport () |
Called before editor copy, true allow export | |
| bool | ShouldImport
(
FStringView ActorPropString, |
Called before editor paste, true allow import |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
Called before destroying the object. | |
| void | PostDuplicate
(
bool bDuplicateForPIE |
Called after duplication & serialization and before PostLoad. | |
| void | PostEditUndo () |
Called after applying a transaction to the object. | |
| void | Called after the C++ constructor and after the properties have been initialized, including those loaded from config. | ||
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
| void | PreEditUndo () |
Called before applying a transaction to the object. | |
| void | Handles reading, writing, and reference collecting using FArchive. |
Overridden from ISMInstanceManagerProvider
| Type | Name | Description | |
|---|---|---|---|
| ISMInstanceManager * | GetSMInstanceManager
(
const FSMInstanceId& InstanceId |
Attempt to get the instance manager associated with the given static mesh instance, if any. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FOnFoliageTypeMeshChanged |
Typedefs
| Name | Description |
|---|---|
| FOnInstanceCoundChanged | |
| FOnSelectionChanged | Delegate type for selection change events. |
Constants
| Name | Description |
|---|---|
| InstanceCountChanged | |
| SelectionChanged |