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"
6
8
9#if WITH_EDITOR
11{
12public:
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 }
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
36private:
37 FGuid ContentBundleGuid;
38};
39#endif
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition SharedPointer.h:692
Definition Guid.h:109