AInstancedFoliageActor

Windows
MacOS
Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

AActor

AInstancedFoliageActor

References

Module

Foliage

Header

/Engine/Source/Runtime/Foliage/Public/InstancedFoliageActor.h

Include

#include "InstancedFoliageActor.h"

Syntax

class AInstancedFoliageActor : public AActor

Variables

Name Description

Public variable

TMap< UFoliageT...

 

FoliageInfos

Public variable

FFoliageInstanc...

 

InstanceBaseCache

Cross level references cache for instances base.

Constructors

Name Description

Public function

AInstancedFoliageActor

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

UFoliageType...

 

AddFoliageType

(
    const UFoliageType* InType,
    FFoliageInfo** OutInfo
)

Public function

FFoliageInfo...

 

AddMesh

(
    UStaticMesh* InMesh,
    UFoliageType** OutSettings,
    const UFoliageType_InstancedStaticM...
)

Add a new static mesh.

Public function

FFoliageInfo...

 

AddMesh

(
    UFoliageType* InType
)

Add a new static mesh.

Public function Static

void

 

AddReferencedObjects

(
    UObject* InThis,
    FReferenceCollector& Collector
)

Public function

void

 

ApplySelection

(
    bool bApply
)

Propagate the selected instances to the actual foliage implementation.

Public function Static

bool

 

CheckCollisionWithWorld

(
    const UWorld* InWorld,
    const UFoliageType* Settings,
    const FFoliageInstance& Inst,
    const FVector& HitNormal,
    const FVector& HitLocation,
    UPrimitiveComponent* HitCompon...
)

Public function

void

 

CleanupDeletedFoliageType()

Public function

bool

 

ContainsInstancesFromProceduralFoliageComponent

(
    const UProceduralFoliageComponent&...
)

Public function Static

void

 

DeleteInstancesForComponent

(
    UWorld* InWorld,
    UActorComponent* InComponent
)

Deletes the instances attached to a component, traverses all foliage actors in the world.

Public function

void

 

DeleteInstancesForComponent

(
    UActorComponent* InComponent,
    const UFoliageType* InFoliageT...
)

Deletes the instances attached to a component.

Public function

void

 

DeleteInstancesForComponent

(
    UActorComponent* InComponent
)

Deletes the instances attached to a component.

Public function

void

 

DeleteInstancesForProceduralFoliageComponent

(
    const UProceduralFoliageComponent&...,
    bool InRebuildTree
)

Deletes the instances spawned by a procedural component.

Public function

void

 

DetectFoliageTypeChangeAndUpdate()

Public function Const

const UFolia...

 

FindFoliageType

(
    const FFoliageInfo* InFoliageI...
)

Returns FoliageType associated to this FoliageInfo.

Public function

FFoliageInfo...

 

FindFoliageTypeOfClass

Public function Const

const FFolia...

 

FindInfo

(
    const UFoliageType* InType
)

Finds a mesh entry.

Public function

FFoliageInfo...

 

FindInfo

(
    const UFoliageType* InType
)

Finds a mesh entry.

Public function

FFoliageInfo...

 

FindOrAddMesh

(
    UFoliageType* InType
)

Finds a mesh entry or adds it if it doesn't already exist.

Public function Static

bool

 

FoliageTrace

(
    const UWorld* InWorld,
    FHitResult& OutHit,
    const FDesiredFoliageInstance& Des...,
    FName InTraceTag,
    bool InbReturnFaceIndex,
    const FFoliageTraceFilterFunc& Fil...
)

Public function

void

 

GetAllFoliageTypesForSource

(
    const UObject* InSource,
    TArray< const UFoliageType* > ...
)

Performs a reverse lookup from a source object to all the foliage types that are currently using that object (includes assets and blueprint classes)

Public function

TMap< UFolia...

 

GetAllInstancesFoliageType()

Will return all the foliage type used.

Public function Const

UActorCompon...

 

GetBaseComponentFromBaseId

(
    const FFoliageInstanceBaseId& Base...
)

Public function Static

AInstancedFo...

 

GetInstancedFoliageActorForCurrentLevel

(
    UWorld* InWorld,
    bool bCreateIfNone
)

Get the instanced foliage actor for the current streaming level.

Public function Static

AInstancedFo...

 

GetInstancedFoliageActorForLevel

(
    ULevel* Level,
    bool bCreateIfNone
)

Get the instanced foliage actor for the specified streaming level.

Public function

TMap< UFolia...

 

GetInstancesForComponent

(
    UActorComponent* InComponent
)

Returns a map of Static Meshes and their placed instances attached to a component.

Public function

UFoliageType...

 

GetLocalFoliageTypeForSource

(
    const UObject* InSource,
    FFoliageInfo** OutMeshInfo
)

Performs a reverse lookup from a source object to a local foliage type (i.e. the foliage type owned exclusively by this IFA)

Public function Const

int32

 

GetOverlappingBoxCount

(
    const UFoliageType* FoliageTyp...,
    const FBox& Box
)

Finds the number of instances overlapping with the box.

Public function Const

void

 

GetOverlappingBoxTransforms

(
    const UFoliageType* FoliageTyp...,
    const FBox& Box,
    TArray< FTransform >& OutTransform...
)

Finds all instances in the provided box and get their transforms.

Public function Const

void

 

GetOverlappingMeshCounts

(
    const FSphere& Sphere,
    TMap< UStaticMesh*, int32 >& ...
)

Perf Warnin: potentially slow! Dev-only use recommended.

Public function Const

int32

 

GetOverlappingSphereCount

(
    const UFoliageType* FoliageTyp...,
    const FSphere& Sphere
)

Finds the number of instances overlapping with the sphere.

Public function

TMap< UFolia...

 

GetSelectedInstancesFoliageType()

Will return all the foliage type used by currently selected instances.

Public function Const

bool

 

GetSelectionLocation

(
    FBox& OutLocation
)

Returns the location for the widget.

Public function Static

bool

 

HasFoliageAttached

(
    UActorComponent* InComponent
)

Whether there any foliage instances painted on specified component

Public function Const

bool

 

HasSelectedInstances()

Whether actor has selected instances.

Public function

void

 

MapRebuild()

Called in response to BSP rebuilds to migrate foliage from obsolete to new components.

Public function

void

 

MoveAllInstancesToLevel

(
    ULevel* InTargetLevel
)

Move all instances to a foliage actor in target level.

Public function Static

void

 

MoveInstancesForComponentToCurrentLevel

(
    UActorComponent* InComponent
)

Moves instances based on the specified component to the current streaming level.

Public function Static

void

 

MoveInstancesForComponentToLevel

(
    UActorComponent* InComponent,
    ULevel* TargetLevel
)

Public function

void

 

MoveInstancesForMovedComponent

(
    UActorComponent* InComponent
)

Move instances based on a component that has just been moved.

Public function

void

 

MoveInstancesForMovedOwnedActors

(
    AActor* InActor
)

Move instances that are owned by foliage actor.

Public function

void

 

MoveInstancesToLevel

(
    ULevel* InTargetLevel,
    TSet< int32 >& InInstanceList,
    FFoliageInfo* InCurrentMeshInf...,
    UFoliageType* InFoliageType,
    bool bSelect
)

Move instances to a foliage actor in target level.

Public function Static

void

 

MoveInstancesToNewComponent

(
    UWorld* InWorld,
    UPrimitiveComponent* InOldComp...,
    const FBox& InBoxWithInstancesToMo...,
    UPrimitiveComponent* InNewComp...
)

Change all instances based on one component to a new component (possible in another level).

Public function Static

void

 

MoveInstancesToNewComponent

(
    UWorld* InWorld,
    UPrimitiveComponent* InOldComp...,
    UPrimitiveComponent* InNewComp...
)

Change all instances based on one component to a new component (possible in another level).

Public function

void

 

MoveInstancesToNewComponent

(
    UPrimitiveComponent* InOldComp...,
    const FBox& InBoxWithInstancesToMo...,
    UPrimitiveComponent* InNewComp...
)

Change all instances based on one component to a new component (possible in another level).

Public function

void

 

MoveInstancesToNewComponent

(
    UPrimitiveComponent* InOldComp...,
    UPrimitiveComponent* InNewComp...
)

Change all instances based on one component to a new component (possible in another level).

Public function

void

 

MoveSelectedInstancesToLevel

(
    ULevel* InTargetLevel
)

Move selected instances to a foliage actor in target level.

Public function

void

 

NotifyFoliageTypeChanged

(
    UFoliageType* FoliageType,
    bool bSourceChanged
)

Called to notify InstancedFoliageActor that a UFoliageType has been modified

Public function

void

 

NotifyFoliageTypeWillChange

(
    UFoliageType* FoliageType
)

Public function

FOnFoliageTy...

 

OnFoliageTypeMeshChanged()

Public function

void

 

RemoveBaseComponentOnFoliageTypeInstances

(
    UFoliageType* FoliageType
)

Public function

void

 

RemoveFoliageType

(
    UFoliageType** InFoliageTy...,
    int32 Num
)

Remove the FoliageType from the list, and all its instances.

Public function

void

 

RepairDuplicateIFA

(
    AInstancedFoliageActor* InDupl...
)

Fix up a duplicate IFA

Public function

void

 

SelectInstance

(
    UInstancedStaticMeshComponent*...,
    int32 InComponentInstanceIndex,
    bool bToggle
)

Select an individual instance.

Public function

void

 

SelectInstance

(
    AActor* InActor,
    bool bToggle
)

Select an individual instance.

Overridden from AActor

Name Description

Public function Virtual

void

 

Destroyed()

Called when this actor is explicitly being destroyed during gameplay or in the editor, not called during level streaming or gameplay ending

Protected function Virtual

float

 

InternalTakeRadialDamage

(
    float Damage,
    FRadialDamageEvent const& RadialDa...,
    AController* EventInstigator,
    AActor* DamageCauser
)

Default InternalTakeRadialDamage behavior finds and scales damage for the closest component which isn't appropriate for foliage.

Public function Virtual Const

bool

 

IsLevelBoundsRelevant()

Indicates whether this actor should participate in level bounds calculations

Public function Virtual

void

 

RerunConstructionScripts()

We don't want to have our components automatically destroyed by the Blueprint code

Public function Virtual

bool

 

ShouldExport()

Called before editor copy, true allow export

Public function Virtual

bool

 

ShouldImport

(
    FString* ActorPropString,
    bool IsMovingLevel
)

Called before editor paste, true allow import

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

void

 

PostEditUndo()

Called after applying a transaction to the object.

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

PreEditUndo()

Called before applying a transaction to the object.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Classes

Name

Description

Public class

FOnFoliageTypeMeshChanged

Typedefs

Name

Description

FOnInstanceCoundChanged

FOnSelectionChanged

Delegate type for selection change events.

Constants

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss