6#include "Containers/Array.h"
7#include "Containers/Set.h"
32#include "SoftObjectPath.generated.h"
41#define UE_SOFTOBJECTPATH_FSTRING_DEPRECATED(Version, Message)
54USTRUCT(BlueprintType, meta=(HasNativeMake=
"/Script/Engine.KismetSystemLibrary.MakeSoftObjectPath", HasNativeBreak=
"/Script/Engine.KismetSystemLibrary.BreakSoftObjectPath"))
81 UE_DEPRECATED(5.6,
"FSoftObjectPath which takes a package name and asset name has been deprecated - please pass FTopLevelAssetPath instead.")
112 template <
typename T>
119 SetPath(
reinterpret_cast<const UObject*
>(InObject.
Get()));
132 SetPath(InObject.
Get());
148 UE_DEPRECATED(5.6,
"FSoftObjectPath::ConstructFromPackageAssetSubpath has been deprecated - please use ConstructFromAssetPathAndSubpath instead.")
150 UE_DEPRECATED(5.6,
"FSoftObjectPath::ConstructFromPackageAsset has been deprecated - please use ConstructFromAssetPath instead.")
152 UE_SOFTOBJECTPATH_FSTRING_DEPRECATED(5.6,
"FSoftObjectPath::ConstructFromAssetPathAndSubpath with a wide string subpath has been deprecated - please use a UTF8 subpath instead.")
161 template <
typename T>
164 return ConstructFromObject(InObject.
Get());
230 if (AssetPath.IsNull())
235 return AssetPath.ToString();
242 return FString(SubPathString);
246 return SubPathString;
249 UE_SOFTOBJECTPATH_FSTRING_DEPRECATED(5.6,
"FSoftObjectPath::ConstructFromAssetPathAndSubpath with a wide string subpath has been deprecated - please use a UTF8 subpath instead.")
262 FName PackageName = GetAssetPath().GetPackageName();
269 return GetAssetPath().GetPackageName();
275 FName AssetName = GetAssetPath().GetAssetName();
276 return AssetName.IsNone() ? FString() : AssetName.ToString();
282 return GetAssetPath().GetAssetName();
339 SubPathString.Reset();
345 return AssetPath.IsValid();
351 return AssetPath.IsNull();
357 return !AssetPath.IsNull() && SubPathString.IsEmpty();
363 return !AssetPath.IsNull() && !SubPathString.IsEmpty();
374 return SubPathString.Compare(
Other.SubPathString) < 0;
385 return SubPathString.Compare(
Other.SubPathString) < 0;
393#if !PLATFORM_COMPILER_HAS_GENERATED_COMPARISON_OPERATORS
396 return !(*
this ==
Other);
432 if (!This.SubPathString.IsEmpty())
445 template <
typename T>
493 WithZeroConstructor =
true,
494 WithStructuredSerializer =
true,
496 WithIdenticalViaEquality =
true,
497 WithExportTextItem =
true,
498 WithImportTextItem =
true,
499 WithStructuredSerializeFromMismatchedTag =
true,
537USTRUCT(BlueprintType, meta=(HasNativeMake=
"/Script/Engine.KismetSystemLibrary.MakeSoftClassPath", HasNativeBreak=
"/Script/Engine.KismetSystemLibrary.BreakSoftClassPath"))
691 struct FSerializationOptions
760 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = FilePath)
773 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Path)
783 this->SetIsSaving(
true);
784 this->ArShouldSkipBulkData =
true;
785 this->SetShouldSkipCompilingAssets(
true);
801 FixupFunction(
Value);
813 Root->Serialize(*
this);
816 for (
UObject* Obj : SubObjects)
818 Obj->Serialize(*
this);
827 UE_DEPRECATED(5.1,
"This function is only for use in fixing up deprecated APIs.")
841 UE_DEPRECATED(5.1,
"This function is only for use in fixing up deprecated APIs.")
850 Result.SetPath(Name.ToString());
858#if WITH_LOW_LEVEL_TESTS
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#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 DECLARE_DELEGATE_TwoParams(DelegateName, Param1Type, Param2Type)
Definition DelegateCombinations.h:57
void SerializeForLog(FCbWriter &Writer, const FIoStatus &Status)
Definition IoStatus.cpp:107
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define USTRUCT(...)
Definition ObjectMacros.h:746
@ LOAD_None
No flags.
Definition ObjectMacros.h:69
EPropertyObjectReferenceType
Definition ObjectMacros.h:533
ESoftObjectPathCollectType
Definition SoftObjectPath.h:618
constexpr auto FSoftObjectPath_DefaultPreFixupForPIEFunction
Definition SoftObjectPath.h:46
FStringBuilderBase & operator<<(FStringBuilderBase &Builder, const FSoftObjectPath &Path)
Definition SoftObjectPath.h:523
ESoftObjectPathSerializeType
Definition SoftObjectPath.h:671
@ SkipSerializeIfArchiveHasSize
#define UE_SOFTOBJECTPATH_FSTRING_DEPRECATED(Version, Message)
Definition SoftObjectPath.h:41
TStringView< TCHAR > FStringView
Definition StringFwd.h:45
TStringView< WIDECHAR > FWideStringView
Definition StringFwd.h:47
TStringView< ANSICHAR > FAnsiStringView
Definition StringFwd.h:46
#define UE_DECLARE_THREAD_SINGLETON_TLS(Type, Api)
Definition ThreadSingleton.h:35
constexpr uint32 HashCombineFast(uint32 A, uint32 B)
Definition TypeHash.h:74
void GetObjectsWithOuter(const class UObjectBase *Outer, TArray< UObject * > &Results, bool bIncludeNestedObjects, EObjectFlags ExclusionFlags, EInternalObjectFlags ExclusionInternalFlags)
Definition UObjectHash.cpp:1551
Definition ArchiveUObject.h:17
Definition Archive.h:1208
Definition CompactBinaryWriter.h:68
Definition NameTypes.h:617
CORE_API FString ToString() const
Definition UnrealNames.cpp:3537
FORCEINLINE bool IsNone() const
Definition NameTypes.h:827
Definition OutputDevice.h:133
Definition SoftObjectPath.h:683
Definition StructuredArchiveSlots.h:52
UE_FORCEINLINE_HINT SizeType Emplace(ArgsType &&... Args)
Definition Array.h:2561
ElementType Pop(EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:1196
UE_FORCEINLINE_HINT void Reserve(SizeType Number)
Definition Array.h:3016
Definition AssetRegistryState.h:50
Definition AndroidPlatformMisc.h:14
Definition StringView.h:107
Definition ThreadSingleton.h:44
static FORCEINLINE FSoftObjectPathThreadContext & Get()
Definition ThreadSingleton.h:101
void Transform(const InT &Input, OutT &&Output, TransformT Trans)
Definition Transform.h:66
@ IgnoreCase
Definition CString.h:26
Definition SoftObjectPath.h:826
TArray< FName > ConvertSoftObjectPaths(TConstArrayView< FSoftObjectPath > InPaths)
Definition SoftObjectPath.h:828
TArray< FSoftObjectPath > ConvertObjectPathNames(TConstArrayView< FName > InPaths)
Definition SoftObjectPath.h:842
Definition SoftObjectPath.h:638
bool IsObjectType(ESoftObjectPathCollectType CollectType)
Definition SoftObjectPath.h:650
bool IsPackageType(ESoftObjectPathCollectType CollectType)
Definition SoftObjectPath.h:644
bool IsCollectable(ESoftObjectPathCollectType CollectType)
Definition SoftObjectPath.h:660
CORE_API FString ToString() const
Definition Color.cpp:584
Definition SoftObjectPath.h:767
Definition SoftObjectPath.h:754
Definition ObjectPtr.h:55
FORCEINLINE UObject * Get() const
Definition ObjectPtr.h:104
FORCEINLINE bool IsResolved() const
Definition ObjectPtr.h:186
FString GetPathName() const
Definition ObjectPtr.h:223
Definition PropertyTag.h:38
Definition SoftObjectPath.h:539
FSoftClassPath(FSoftClassPath &&Other)=default
FSoftClassPath(const FString &PathString)
Definition SoftObjectPath.h:552
FSoftClassPath(const UClass *InClass)
Definition SoftObjectPath.h:560
FSoftClassPath(const FSoftClassPath &Other)=default
FSoftClassPath & operator=(const FSoftClassPath &Path)=default
FSoftClassPath & operator=(FSoftClassPath &&Path)=default
UClass * TryLoadClass() const
Definition SoftObjectPath.h:570
~FSoftClassPath()=default
Definition SoftObjectPath.h:507
bool operator()(const FSoftObjectPath &Lhs, const FSoftObjectPath &Rhs) const
Definition SoftObjectPath.h:508
Definition SoftObjectPath.h:779
virtual FArchive & operator<<(FObjectPtr &Value) override
Definition SoftObjectPath.h:805
void Fixup(UObject *Root)
Definition SoftObjectPath.h:811
FArchive & operator<<(FSoftObjectPath &Value) override
Definition SoftObjectPath.h:799
FSoftObjectPathFixupArchive(TFunction< void(FSoftObjectPath &)> InFixupFunction)
Definition SoftObjectPath.h:780
FSoftObjectPathFixupArchive(const FString &InOldAssetPathString, const FString &InNewAssetPathString)
Definition SoftObjectPath.h:788
TFunction< void(FSoftObjectPath &)> FixupFunction
Definition SoftObjectPath.h:822
Definition SoftObjectPath.h:516
bool operator()(const FSoftObjectPath &Lhs, const FSoftObjectPath &Rhs) const
Definition SoftObjectPath.h:517
Definition SoftObjectPath.h:727
~FSoftObjectPathSerializationScope()
Definition SoftObjectPath.h:745
FSoftObjectPathSerializationScope(FName SerializingPackageName, FName SerializingPropertyName, ESoftObjectPathCollectType CollectType, ESoftObjectPathSerializeType SerializeType)
Definition SoftObjectPath.h:735
FSoftObjectPathSerializationScope(ESoftObjectPathCollectType CollectType)
Definition SoftObjectPath.h:740
Definition SoftObjectPath.h:56
FSoftObjectPath(FTopLevelAssetPath InAssetPath)
Definition SoftObjectPath.h:88
FSoftObjectPath & operator=(const FSoftObjectPath &Path)=default
FSoftObjectPath & operator=(const FString &Path)
Definition SoftObjectPath.h:172
FSoftObjectPath & operator=(const FTopLevelAssetPath Path)
Definition SoftObjectPath.h:167
FSoftObjectPath(FName InPackageName, FName InAssetName, const FString &InSubPathString)
Definition SoftObjectPath.h:82
FSoftObjectPath(const TObjectPtr< T > &InObject)
Definition SoftObjectPath.h:113
void SetPath(const FString &Path)
Definition SoftObjectPath.h:302
FSoftObjectPath & operator=(const WIDECHAR *Path)
Definition SoftObjectPath.h:187
FSoftObjectPath GetWithoutSubPath() const
Definition SoftObjectPath.h:222
void SetPath(const ANSICHAR *Path)
Definition SoftObjectPath.h:298
bool operator!=(FSoftObjectPath const &Other) const
Definition SoftObjectPath.h:394
FName GetLongPackageFName() const
Definition SoftObjectPath.h:267
bool FastLess(const FSoftObjectPath &Other) const
Definition SoftObjectPath.h:378
friend uint32 GetTypeHash(FSoftObjectPath const &This)
Definition SoftObjectPath.h:428
FSoftObjectPath(FSoftObjectPath &&Other)=default
FSoftObjectPath & operator=(FAnsiStringView Path)
Definition SoftObjectPath.h:182
FSoftObjectPath(FWideStringView Path)
Definition SoftObjectPath.h:92
FSoftObjectPath(TYPE_OF_NULLPTR)
Definition SoftObjectPath.h:108
FSoftObjectPath(const ANSICHAR *Path)
Definition SoftObjectPath.h:104
FSoftObjectPath(FTopLevelAssetPath InAssetPath, TStringOverload< FWideString > InSubPathString)
Definition SoftObjectPath.h:73
static UE_FORCEINLINE_HINT FSoftObjectPath GetOrCreateIDForObject(TObjectPtr< T > Object)
Definition SoftObjectPath.h:446
FTopLevelAssetPath GetAssetPath() const
Definition SoftObjectPath.h:216
~FSoftObjectPath()=default
FSoftObjectPath(const FObjectPtr &InObject)
Definition SoftObjectPath.h:127
FSoftObjectPath()=default
FString GetAssetName() const
Definition SoftObjectPath.h:273
UE_FORCEINLINE_HINT bool IsValid() const
Definition SoftObjectPath.h:343
FString GetAssetPathString() const
Definition SoftObjectPath.h:228
FSoftObjectPath(FAnsiStringView Path)
Definition SoftObjectPath.h:96
FSoftObjectPath & operator=(FWideStringView Path)
Definition SoftObjectPath.h:177
UE_FORCEINLINE_HINT bool IsSubobject() const
Definition SoftObjectPath.h:361
UE_FORCEINLINE_HINT void SetSubPathString(TStringOverload< FUtf8String > InSubPathString)
Definition SoftObjectPath.h:254
FSoftObjectPath(const UObject *InObject)
Definition SoftObjectPath.h:141
FSoftObjectPath & operator=(const ANSICHAR *Path)
Definition SoftObjectPath.h:192
static UE_FORCEINLINE_HINT FSoftObjectPath GetOrCreateIDForObject(const UObject *Object)
Definition SoftObjectPath.h:441
FSoftObjectPath(FTopLevelAssetPath InAssetPath, TStringOverload< FUtf8String > InSubPathString)
Definition SoftObjectPath.h:77
FSoftObjectPath(const WIDECHAR *Path)
Definition SoftObjectPath.h:100
bool LexicalLess(const FSoftObjectPath &Other) const
Definition SoftObjectPath.h:367
UE_FORCEINLINE_HINT bool IsNull() const
Definition SoftObjectPath.h:349
FSoftObjectPath & operator=(TYPE_OF_NULLPTR)
Definition SoftObjectPath.h:197
static FSoftObjectPath ConstructFromObject(const TObjectPtr< T > &InObject)
Definition SoftObjectPath.h:162
UE_FORCEINLINE_HINT bool IsAsset() const
Definition SoftObjectPath.h:355
UE_FORCEINLINE_HINT FString GetSubPathString() const
Definition SoftObjectPath.h:240
FSoftObjectPath & operator=(FSoftObjectPath &&Path)=default
FSoftObjectPath(const FSoftObjectPath &Other)=default
void Reset()
Definition SoftObjectPath.h:336
FSoftObjectPath(const FString &Path)
Definition SoftObjectPath.h:68
FString GetLongPackageName() const
Definition SoftObjectPath.h:260
UE_FORCEINLINE_HINT const FUtf8String & GetSubPathUtf8String() const
Definition SoftObjectPath.h:244
FName GetAssetFName() const
Definition SoftObjectPath.h:280
Definition TopLevelAssetPath.h:38
Definition UObjectThreadContext.h:140
Definition ObjectPtr.h:488
FORCEINLINE bool IsResolved() const
Definition ObjectPtr.h:726
FORCEINLINE FString GetPathName() const
Definition ObjectPtr.h:738
FORCEINLINE T * Get() const
Definition ObjectPtr.h:664
Definition StringOverload.h:31
Definition StructOpsTypeTraits.h:11
@ WithStructuredSerializeFromMismatchedTag
Definition StructOpsTypeTraits.h:29
@ WithZeroConstructor
Definition StructOpsTypeTraits.h:14
@ WithIdenticalViaEquality
Definition StructOpsTypeTraits.h:18
@ WithCopy
Definition StructOpsTypeTraits.h:17
@ WithExportTextItem
Definition StructOpsTypeTraits.h:20
@ WithSerializer
Definition StructOpsTypeTraits.h:23
@ WithImportTextItem
Definition StructOpsTypeTraits.h:21
static constexpr EPropertyObjectReferenceType WithSerializerObjectReferences
Definition StructOpsTypeTraits.h:41
Definition StructOpsTypeTraits.h:46