UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FoliageHelper.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
#pragma once
4
5
#include "
CoreMinimal.h
"
6
#include "
GameFramework/Actor.h
"
7
11
class
FFoliageHelper
12
{
13
public
:
14
#if WITH_EDITOR
15
static
inline
FName
GetFoliageActorInstanceTag
()
16
{
17
static
FName
NAME_FoliageActorInstanceTag
(
TEXT
(
"FoliageActorInstance"
));
18
return
NAME_FoliageActorInstanceTag
;
19
}
20
21
static
inline
void
SetIsOwnedByFoliage
(
AActor
*
InActor
,
bool
bOwned
=
true
)
22
{
23
if
(
InActor
)
24
{
25
FSetActorHiddenInSceneOutliner
SetHidden(
InActor
,
bOwned
);
26
if
(
bOwned
)
27
{
28
InActor
->Tags.AddUnique(
GetFoliageActorInstanceTag
());
29
}
30
else
31
{
32
InActor
->Tags.Remove(
GetFoliageActorInstanceTag
());
33
}
34
}
35
}
36
37
static
inline
bool
IsOwnedByFoliage
(
const
AActor
*
InActor
)
38
{
39
return
InActor
&&
InActor
->ActorHasTag(
GetFoliageActorInstanceTag
());
40
}
41
#endif
42
};
Actor.h
CoreMinimal.h
TEXT
#define TEXT(x)
Definition
Platform.h:1272
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
AActor
Definition
Actor.h:257
FFoliageHelper
Definition
FoliageHelper.h:12
FName
Definition
NameTypes.h:617
Engine
Source
Runtime
Foliage
Public
FoliageHelper.h
Generated by
1.9.8