UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CookEvents.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
#pragma once
4
5
#if WITH_EDITOR
6
#include "Containers/Array.h"
7
#include "
Cooker/CookDependency.h
"
8
#include "
UObject/ObjectSaveContext.h
"
9
10
class
ITargetPlatform
;
11
namespace
UE::Cook
{
class
ICookInfo
; }
12
#endif
// WITH_EDITOR
13
14
#if WITH_EDITOR
15
16
namespace
UE::Cook
17
{
18
24
enum class
ECookEvent
:
uint32
25
{
46
PlatformCookDependencies
,
47
};
48
54
class
FCookEventContext
55
{
56
public
:
57
explicit
FCookEventContext
(
FObjectSaveContextData
&
InData
)
58
:
Data
(
InData
)
59
{
60
}
61
FCookEventContext
(
const
UE::Cook::FCookEventContext&
Other
)
62
:
Data
(
Other
.
Data
)
63
{
64
}
65
70
bool
IsCooking()
const
;
75
ICookInfo
* GetCookInfo()
const
;
81
const
ITargetPlatform
* GetTargetPlatform()
const
;
82
93
COREUOBJECT_API
void
AddLoadBuildDependency
(
FCookDependency
CookDependency
);
100
COREUOBJECT_API
void
AddSaveBuildDependency
(
FCookDependency
CookDependency
);
106
COREUOBJECT_API
void
AddRuntimeDependency
(
FSoftObjectPath
PackageName);
112
COREUOBJECT_API
void
HarvestCookRuntimeDependencies
(
UObject
*
HarvestReferencesFrom
);
113
114
private
:
115
FObjectSaveContextData
&
Data
;
116
};
117
118
119
inline
bool
FCookEventContext::IsCooking()
const
120
{
121
return
Data
.TargetPlatform !=
nullptr
;
122
}
123
124
inline
ICookInfo
* FCookEventContext::GetCookInfo()
const
125
{
126
return
Data
.CookInfo;
127
}
128
129
inline
const
ITargetPlatform
* FCookEventContext::GetTargetPlatform()
const
130
{
131
return
Data
.TargetPlatform;
132
}
133
134
}
// namespace UE::Cook
135
136
#endif
// WITH_EDITOR
EARSessionStatus::Other
@ Other
CookDependency.h
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
ObjectSaveContext.h
uint32
uint32_t uint32
Definition
binka_ue_file_header.h:6
UObject
Definition
Object.h:95
Chaos::Softs::Data
GeometryCollection::Facades::FMuscleActivationData Data
Definition
MuscleActivationConstraints.h:15
UE::Cook
Definition
CookOnTheFly.h:19
UE::SavePackageUtilities::HarvestCookRuntimeDependencies
void HarvestCookRuntimeDependencies(FObjectSaveContextData &Data, UObject *HarvestReferencesFrom)
FObjectSaveContextData
Definition
ObjectSaveContext.h:70
FSoftObjectPath
Definition
SoftObjectPath.h:56
Engine
Source
Runtime
CoreUObject
Public
Cooker
CookEvents.h
Generated by
1.9.8