UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ActorFolder.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6#include "UObject/Object.h"
7#include "Misc/Guid.h"
8#include "Folder.h"
9
10#include "ActorFolder.generated.h"
11
12class ULevel;
13struct FActorFolderDesc;
14
15UCLASS(Within = Level, MinimalAPI)
17{
19
20#if WITH_EDITOR
21public:
22 // Helper that creates a new UActorFolder
24
25 UE_DEPRECATED(5.4, "This function is deprecated.")
27
28 // Returns actor folder info stored in its package
30
31 //~ Begin UObject
32 ENGINE_API virtual bool IsAsset() const override;
33 ENGINE_API virtual void GetAssetRegistryTags(FAssetRegistryTagsContext Context) const override;
34 UE_DEPRECATED(5.4, "Implement the version that takes FAssetRegistryTagsContext instead.")
35 ENGINE_API virtual void GetAssetRegistryTags(TArray<FAssetRegistryTag>& OutTags) const override;
36 ENGINE_API virtual void PostLoad() override;
37 //~ End UObject
38
39 ENGINE_API void SetParent(UActorFolder* InParent);
40 ENGINE_API UActorFolder* GetParent(bool bSkipDeleted = true) const;
41
42 ENGINE_API void SetLabel(const FString& InFolderLabel);
43 const FString& GetLabel() const { return FolderLabel; }
44
45 // Control whether the folder is initially expanded or not
47 bool IsInitiallyExpanded() const { return bFolderInitiallyExpanded; }
48
49 const FGuid& GetGuid() const { return FolderGuid; }
50 ENGINE_API FName GetPath() const;
51 ENGINE_API FString GetDisplayName() const;
52
54 bool IsMarkedAsDeleted() const { return bIsDeleted; }
55
56 // Checks if folder is valid (if it's not deleted)
57 bool IsValid() const { return !IsMarkedAsDeleted(); }
58
59 // Remaps parent folder to the first parent folder not marked as deleted
60 ENGINE_API void Fixup();
61 // Detects and clears invalid parent folder
63
65
71 ENGINE_API void SetPackageExternal(bool bExternal, bool bShouldDirty = true);
72
73private:
75#endif
76
77#if WITH_EDITORONLY_DATA
78private:
79 UPROPERTY()
81
82 UPROPERTY()
84
85 UPROPERTY()
86 FString FolderLabel;
87
88 UPROPERTY()
89 bool bFolderInitiallyExpanded = true;
90
91 UPROPERTY()
92 bool bIsDeleted;
93#endif
94};
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
EPackageFlags
Definition ObjectMacros.h:129
@ PKG_EditorOnly
This is editor-only package (for example: editor module script package)
Definition ObjectMacros.h:136
@ PKG_ContainsMapData
Contains map data (UObjects only referenced by a single ULevel) but is stored in a different package.
Definition ObjectMacros.h:144
@ PKG_NewlyCreated
Newly created package, not saved yet. In editor only.
Definition ObjectMacros.h:131
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition AssetRegistryTagsContext.h:98
Definition NameTypes.h:617
Definition Array.h:670
Definition ActorFolder.h:17
Definition Level.h:423
Definition Object.h:95
Definition Folder.h:18
Definition Guid.h:109