Language:
Discover
By Skill Level
By Category

AInstancedFoliageActor

Choose your OS:

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

AActor

AInstancedFoliageActor

Syntax

class AInstancedFoliageActor : public AActor

Variables

Name Description

Public variable

TMap < UFoliageT ...

 

FoliageMeshes

WITH_EDITORONLY_DATA.

Public variable

FFoliageInstanc ...

 

InstanceBaseCache

Cross level references cache for instances base.

Constructors

Name Description

Public function

AInstancedFoliageActor

(
    const FObjectInitializer & ObjectIn...
)

WITH_EDITOR.

Functions

Name Description

Public function

FOLIAGE_API ...

 

AddFoliageType

(
    const UFoliageType * InType,
    FFoliageMeshInfo ** OutInfo
)

Public function

FOLIAGE_API ...

 

AddMesh

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

Add a new static mesh.

Public function

FOLIAGE_API ...

 

AddMesh

(
    UFoliageType * InType
)

Public function Static

void

 

AddReferencedObjects

(
    UObject * InThis,
    FReferenceCollector & Collector
)

Serialize all our UObjects for RTGC

Public function

FOLIAGE_API ...

 

ApplySelectionToComponents

(
    bool bApply
)

Propagate the selected instances to the actual render components.

Public function Static

FOLIAGE_API ...

 

CheckCollisionWithWorld

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

Public function

FOLIAGE_API ...

 

CleanupDeletedFoliageType()

Public function

bool

 

ContainsInstancesFromProceduralFoliageComponent

(
    const UProceduralFoliageComponent &...
)

True if any instances exist that were spawned by the given procedural component

Public function Static

FOLIAGE_API ...

 

DeleteInstancesForComponent

(
    UWorld * InWorld,
    UActorComponent * InComponent
)

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

Public function

FOLIAGE_API ...

 

DeleteInstancesForComponent

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

Public function

FOLIAGE_API ...

 

DeleteInstancesForComponent

(
    UActorComponent * InComponent
)

Deletes the instances attached to a component.

Public function

void

 

DeleteInstancesForProceduralFoliageComponent

(
    const UProceduralFoliageComponent &...
)

Deletes the instances spawned by a procedural component.

Public function

FOLIAGE_API ...

 

FindFoliageTypeOfClass

Public function

FOLIAGE_API ...

 

FindMesh

(
    const UFoliageType * InType
)

Finds a mesh entry.

Public function

FOLIAGE_API ...

 

FindMesh

(
    const UFoliageType * InType
)

Finds a mesh entry.

Public function

FOLIAGE_API ...

 

FindOrAddMesh

(
    UFoliageType * InType
)

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

Public function Static

FOLIAGE_API ...

 

FoliageTrace

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

Public function

FOLIAGE_API ...

 

GetAllFoliageTypesForMesh

(
    const UStaticMesh * InMesh,
    TArray < const UFoliageType * > ...
)

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

Public function

FOLIAGE_API ...

 

GetAllInstancesFoliageType()

Will return all the foliage type used.

Public function Static

FOLIAGE_API ...

 

GetInstancedFoliageActorForCurrentLevel

(
    UWorld * InWorld,
    bool bCreateIfNone
)

Get the instanced foliage actor for the current streaming level.

Public function Static

FOLIAGE_API ...

 

GetInstancedFoliageActorForLevel

(
    ULevel * Level,
    bool bCreateIfNone
)

Get the instanced foliage actor for the specified streaming level.

Public function

FOLIAGE_API ...

 

GetInstancesForComponent

(
    UActorComponent * InComponent
)

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

Public function

FOLIAGE_API ...

 

GetLocalFoliageTypeForMesh

(
    const UStaticMesh * InMesh,
    FFoliageMeshInfo ** OutMesh...
)

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

Public function

FOLIAGE_API ...

 

GetOverlappingBoxCount

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

Finds the number of instances overlapping with the box.

Public function

FOLIAGE_API ...

 

GetOverlappingBoxTransforms

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

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

Public function

FOLIAGE_API ...

 

GetOverlappingMeshCounts

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

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

Public function

FOLIAGE_API ...

 

GetOverlappingSphereCount

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

Finds the number of instances overlapping with the sphere.

Public function

FOLIAGE_API ...

 

GetSelectedInstancesFoliageType()

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

Public function

FOLIAGE_API ...

 

GetSelectionLocation

(
    FVector & OutLocation
)

Returns the location for the widget.

Public function Static

FOLIAGE_API ...

 

HasFoliageAttached

(
    UActorComponent * InComponent
)

Whether there any foliage instances painted on specified component

Public function

FOLIAGE_API ...

 

HasSelectedInstances()

Whether actor has selected instances.

Public function

FOLIAGE_API ...

 

MapRebuild()

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

Public function

FOLIAGE_API ...

 

MoveAllInstancesToLevel

(
    ULevel * InTargetLevel
)

Move all instances to a foliage actor in target level.

Public function Static

FOLIAGE_API ...

 

MoveInstancesForComponentToCurrentLevel

(
    UActorComponent * InComponent
)

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

Public function

void

 

MoveInstancesForMovedComponent

(
    UActorComponent * InComponent
)

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

Public function Static

FOLIAGE_API ...

 

MoveInstancesToNewComponent

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

Public function

FOLIAGE_API ...

 

MoveInstancesToNewComponent

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

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

Public function

FOLIAGE_API ...

 

MoveSelectedInstancesToLevel

(
    ULevel * InTargetLevel
)

Move selected instances to a foliage actor in target level.

Public function

void

 

NotifyFoliageTypeChanged

(
    UFoliageType * FoliageType,
    bool bMeshChanged
)

Called to notify InstancedFoliageActor that a UFoliageType has been modified

Public function

void

 

NotifyFoliageTypeWillChange

(
    UFoliageType * FoliageType,
    bool bMeshChanged
)

Public function

FOnFoliageTy ...

 

OnFoliageTypeMeshChanged()

Public function

FOLIAGE_API ...

 

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

FOLIAGE_API ...

 

SelectInstance

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

Select an individual instance.

Overridden from AActor

Name Description

Public function Virtual

void

 

Destroyed()

Called once this actor has been deleted

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

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, and immediately after any undo/redo.

Public function Virtual

void

 

PreEditUndo()

Called before applying a transaction to the object.

Public function Virtual

void

 

Serialize

(
    FArchive & Ar
)

UObject serializer.

Classes

Name

Description

Public class

FOnFoliageTypeMeshChanged

References

Module

Foliage

Header

Runtime/Foliage/Public/InstancedFoliageActor.h