UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ContentBundleActivationScope.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
#pragma once
3
4
#include "
CoreMinimal.h
"
5
#include "
WorldPartition/ContentBundle/ContentBundleEditorSubsystemInterface.h
"
6
7
class
FContentBundleEditor
;
8
9
#if WITH_EDITOR
10
class
FContentBundleActivationScope
11
{
12
public
:
13
FContentBundleActivationScope
(
FGuid
InContentBundleGuid
)
14
{
15
ContentBundleGuid =
InContentBundleGuid
;
16
17
IContentBundleEditorSubsystemInterface
*
ContentBundleEditorSubsystem
= IContentBundleEditorSubsystemInterface::Get();
18
ContentBundleEditorSubsystem
->PushContentBundleEditing();
19
20
if
(
TSharedPtr<FContentBundleEditor>
ContentBundleEditor
=
ContentBundleEditorSubsystem
->GetEditorContentBundle(ContentBundleGuid))
21
{
22
ContentBundleEditorSubsystem
->ActivateContentBundleEditing(
ContentBundleEditor
);
23
}
24
}
25
~FContentBundleActivationScope
()
26
{
27
IContentBundleEditorSubsystemInterface
*
ContentBundleEditorSubsystem
= IContentBundleEditorSubsystemInterface::Get();
28
if
(
TSharedPtr<FContentBundleEditor>
ContentBundleEditor
=
ContentBundleEditorSubsystem
->GetEditorContentBundle(ContentBundleGuid))
29
{
30
ContentBundleEditorSubsystem
->DeactivateContentBundleEditing(
ContentBundleEditor
);
31
}
32
33
ContentBundleEditorSubsystem
->PopContentBundleEditing();
34
}
35
36
private
:
37
FGuid
ContentBundleGuid;
38
};
39
#endif
ContentBundleEditorSubsystemInterface.h
CoreMinimal.h
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
TSharedPtr
Definition
SharedPointer.h:692
FGuid
Definition
Guid.h:109
Engine
Source
Runtime
Engine
Public
WorldPartition
ContentBundle
ContentBundleActivationScope.h
Generated by
1.9.8