Commit Graph

2660 Commits

Author SHA1 Message Date
jamie dale
b9856cb2c0 Added FCoreUObjectDelegates::OnPostInitSparseClassData, to allow extra initialization of sparse class data outside of the struct itself
#preflight 632a2361fc7f1efbdf5cdeaf
#rb Phillip.Kavan, Josh.May

[CL 22107990 by jamie dale in ue5-main branch]
2022-09-20 23:57:13 -04:00
zousar shaker
4318185609 Ensure that FSimpleObjectReferenceCollectorArchive allows subclasses to override the UObject* overload of operator<< and that FObjectPtr overloads of operator<< redirect to the appropriate method in the derived type.
#rb joe.pribele
#rb nick.darnell
#jira UE-164443

[CL 22105286 by zousar shaker in ue5-main branch]
2022-09-20 19:33:23 -04:00
ryan gerleve
7e467430d8 Allow replicated FSoftObjectPtrs to resolve unstably-named objects on clients.
These now serialize a NetGUID tracked by the PackageMap, as other replicated references to objects do. Effectively acts as a weak pointer in the replication case now as well. Soft pointers to stably-named objects continue to replicate their string path.
Added EngineTest cases for replicated soft pointers.

#jira UE-144886
#rb brian.bekich
#preflight 632a22f6b40000c8f08c6e4d

[CL 22105246 by ryan gerleve in ue5-main branch]
2022-09-20 19:31:07 -04:00
nick darnell
f602862479 Core - Reverting the base type of FObjectProperty's FObjectPropertyBase to UObject* instead of TObjectPtr<UObject>, there's some range garbage collection issue this causes where things arent cleaned up in the expected fashion. This may be limited to script, but unsure. Working on it. Reverting for now to fix the EngineTest tests.
#jira UE-164443
[REVIEW] [at]Zousar.Shaker, [at]Joe.Pribele

[CL 22097502 by nick darnell in ue5-main branch]
2022-09-20 13:50:06 -04:00
nick darnell
42c12e3776 Core - Adding support for getting the PathName from a ObjectPtr without resolving the Object*.
Core - Refactoring the Object Handle event callbacks so that we can hook and unhook them with delegates/delegatehandles.
Core - Adding support for detecting loads via object handles as a new event distinct from resolution callback.
Core - Expanding the utility functions on FObjectRef so that we can resolve it in a myraid of fashions to get the path, the class path, the full path and the export path.

[REVIEW] [at]Zousar.Shaker, [at]Joe.Pribele

[CL 22063982 by nick darnell in ue5-main branch]
2022-09-16 20:26:12 -04:00
nick darnell
4b6c70b5a6 Core - Changes the base CPPTYPE of FObjectProperty from UObject* to TObjectPtr<UObject>, this ensures that no matter how people access the value be it as a FObjectProperty or not, calling GetPropertyValue won't return a UObject* directly - which effectively would reinterpret cast a TObjectPtr, if it is one, and then if lazy loading is enabled would potentially result in a crash from trying to treat a non-pointer as a TObjectPtr.
Class - When iterating the classes sparse values, don't accidentally load deferred objects, or crash because you're reinterpret casting the value of something that isn't a pointer.

[REVIEW] [at]Zousar.Shaker, [at]Joe.Pribele

[CL 22063963 by nick darnell in ue5-main branch]
2022-09-16 20:25:31 -04:00
carlmagnus nordin
25d64f3d04 ZenLoader in editor:
* Fixed issue with LOAD_PackageForPIE getting lost when calling LoadPackageAsync from LoadPackageInternal
* Fixed issue with externally created packages not being tracked in the import store and unintentionally being loaded multiple times
* Fixed issue with instancing contexts not being propagated to imported packages

#preflight 63232218e872d7da0397f29e
#rb pj.kack
#jira UE-162812

[CL 22050271 by carlmagnus nordin in ue5-main branch]
2022-09-16 11:32:12 -04:00
phillip kavan
33f35205b9 Defer import class verification to creation time when appropriate so that we don't emit load linker warnings for false positives.
#jira UE-163652
#rb Francis.Hurteau
#preflight 63224e239677b738f4118145

[CL 22041617 by phillip kavan in ue5-main branch]
2022-09-15 19:37:04 -04:00
henrik karlsson
6739fe3d60 [Engine]
* Added UE_SCOPED_ENGINE_ACTIVITY in a couple places that takes noticable amount of time when starting monolith editor

#preflight skip
#rb self

[CL 22030271 by henrik karlsson in ue5-main branch]
2022-09-15 11:47:18 -04:00
jamie dale
70736a012c Allow existing FName properties to be replaced by FSoftObjectPath/Ptr without losing serialized data
#jira
#preflight 6320b7ea29254beccb77a340
#rb Robert.Millar

[CL 22020500 by jamie dale in ue5-main branch]
2022-09-14 19:59:27 -04:00
jamie dale
5f086b8c04 Allow existing FString/FName properties to be replaced by FTopLevelAssetPath without losing serialized data
#jira
#preflight 6320b7ea29254beccb77a340
#rb Robert.Millar

[CL 22020480 by jamie dale in ue5-main branch]
2022-09-14 19:57:38 -04:00
joe pribele
9b03b04000 [CoreUObject] fix for not forcing PreLoad on redirected objects during a lazy load resolve
PreLoad needs to be forced otherwise the object could get used before it has been loaded

#rb zousar.shaker
#preflight 6320a2b4a514fd1e37cff95b

[CL 21997861 by joe pribele in ue5-main branch]
2022-09-13 21:52:28 -04:00
robert millar
38ca9b9750 Relax requirements for separators in FSoftObjectPath to match ResolveName in UObjectGlobals and add some tests.
#rb matt.peters,ben.zeigler
#jira UE-161932
#preflight 6320ffba29254beccb919efe

[CL 21997857 by robert millar in ue5-main branch]
2022-09-13 21:52:02 -04:00
jason walter
a91426a755 Set the external package when linker load finds the package in memory.
#jira UE-153112
#rb francis.hurteau
#preflight 631f79bccd55825044fc5321

[CL 21976325 by jason walter in ue5-main branch]
2022-09-12 19:50:41 -04:00
Matt Peters
a8443cd211 TopLevelAssetPath: Fix constructors to allow UObject subclasses to use the UObject* constructor instead of trying and failing to use the CharType* constructor.
Allow UObject constructor to record a valid path to non-asset toplevelobjects, for consistency with the other constructors which are based on path strings rather than the virtual IsAsset function (which e.g. returns false for UClass).
#rb Robert.Millar
#rnx
#preflight 631f5eafd613b765fa391870

[CL 21967835 by Matt Peters in ue5-main branch]
2022-09-12 13:08:05 -04:00
paul chipchase
337a705d88 Report CustomVersion warnings/errors to the MessageLog
#rb PJ.Kack
#rnx
#preflight 631ef703544fb584da4e1a81

- This will allow the messages to show up when the user clicks the link on the "Failed to load assets" notification in the editor. If the warnings/errors are only printed via UE_LOG, then no messages will be displayed when the user clicks that link which can be confusing.

[CL 21964749 by paul chipchase in ue5-main branch]
2022-09-12 09:56:45 -04:00
phillip kavan
d5e1d97c0d Defer Blueprint CDO export creation on load so that placeholder dependencies can be resolved prior to invoking the native base class ctor.
Notes:
- This change is needed to supplement the feature that allows users to set a subobject override class from the Blueprint editor; i.e. overriding a component class with a non-native Blueprint component class will otherwise fail on reload.

Change summary:
- Modified FLinkerLoad::CreateExport() to move the deferred CDO serialization check to occur prior to CDO construction (part of the linker's circular dependency mitigation code path). This means we now defer its construction in addition to its serialization.
- FLinkerLoad::CreateExport() will continue to bypass class regeneration post-construction when Blueprint finalization is still pending. This is because CDO construction, while now deferred until finalization, still goes through CreateExport() for consistency.
- Modified FLinkerLoad::ResolveDeferredExports() to handle the deferred construction of the CDO during Blueprint finalization, prior to its deferred serialization.
- Modified UClass::Serialize() to bypass the NULL check for failed CDO serialization when deferred dependency loading is active and Blueprint finalization is still pending.

#jira UE-147639
#rb Marc.Audy, Dan.OConnor, Robert.Manuszewski
#preflight 63113f9e942c45ff454f8ef1

[CL 21923865 by phillip kavan in ue5-main branch]
2022-09-09 13:21:26 -04:00
tim smith
c9e823cc53 Allow methods that can only be invoked from a constructor be available when fetching vtable address for HotReload and Live Coding.
#rb trivial
#jira UE-162734
#preflight 631a0b5ed31788ea3a46d912

[CL 21908217 by tim smith in ue5-main branch]
2022-09-08 20:10:07 -04:00
nate strohmyer
5755e91904 Removing unacceptable words in Runtime/CoreUObject
#Jira UE-163059
#rb Marc.Audy
#preflight 6317c1452b7fe03eb650b501

[CL 21892698 by nate strohmyer in ue5-main branch]
2022-09-08 09:16:58 -04:00
Robert Millar
4dae61dfb7 Remove ensure from FSoftObjectPath::SetPath.
#jira UE-163087, FORT-512708, UE-163155, UE-163097
#rb none
#preflight 631900132b7fe03eb6784c28

[CL 21862060 by Robert Millar in ue5-main branch]
2022-09-07 16:53:44 -04:00
nick darnell
1177e0c661 Core - LazyLoad.PrintUnresolvedObjects, now with 100% fewer warnings about FName sorting.
[CL 21827291 by nick darnell in ue5-main branch]
2022-09-06 15:42:27 -04:00
nick darnell
53643412ca Core - Adding a new console command "LazyLoad.PrintUnresolvedObjects", Prints a list of all unresolved objects from the object handle index. This is a great way to examine all the things that *should be loaded* that were avoided being loaded by the lazy loading system.
[FYI] [at]Zousar.Shaker, [at]Joe.Pribele

[CL 21827273 by nick darnell in ue5-main branch]
2022-09-06 15:41:43 -04:00
joe pribele
3cdbbb2797 [CoreUObject] fix for PrintScriptCallstack not printing callstack to the immediate window
logging buffers any call not from the logging thread, added a call to Flush() to force the logger write.

added to improve efficiency in building a stacktrace

FFrame::GetStackDescription(FStringBuilderBase& StringBuilder)
FFrame::GetStackTrace(FStringBuilderBase& StringBuilder)
FFrame::GetScriptCallstack(FStringBuilderBase& StringBuilder, bool bReturnEmpty = false, bool bTopOfStackOnly = false)
UObjectBaseUtility::GetFullName(FStringBuilderBase& ResultString, const UObject* StopOuter = NULL, EObjectFullNameFlags Flags = EObjectFullNameFlags::None) const

#jira UE-161358
#rb zousar.shaker devin.doucette
#preflight 63178f86304480f8f8e1c961

[CL 21826435 by joe pribele in ue5-main branch]
2022-09-06 15:08:01 -04:00
Robert Millar
6a3da51ffd Removing FNames containing asset paths (/Path/To/Package.AssetName) or subobject paths (/Path/To/Package.AssetName:Inner).
These FNames can take 30mb+ of memory in a large project.
Refactor FSoftObjectPath to store a FTopLevelAssetPath instead of an FName for the top level asset part.
Refactor FAssetData to infer the object path from the PackageName and AssetName fields and an editor-only field called OptionalOuterPath for external actors which are non-top-level assets.
Refactor FAssetBundleData to only store top level asset references.
Increase EUnrealEngineObjectUE5Version for FSoftObjectPath invalidation.
Increase FAssetRegistryVersion to invalidate serialization of FAssetData and FAssetBundleData - asset registry serialization does not see EUnrealEngineObjectUE5Version.
Replace TMap in Asset Registry with TSet to avoid duplicating the key fields.
Remove object path FName fields from native blueprint make/break functions for FARFilter - those pins will be orphaned.
Refactor redirect collector to use soft object paths rather than FNames.

UE_DEPRECATED markers have been commented out in this change to allow separate submission of deprecation fixups across the engine.

#jira UE-161932
#rb matt.peters,francis.hurteau,ben.zeigler
#lockdown marc.audy
#preflight

[CL 21826272 by Robert Millar in ue5-main branch]
2022-09-06 15:02:43 -04:00
andy sonnenburg
6c474af8f6 Public change split off from internal change.
#rb andrew.scheidecker
#rb robert.manuszewski
#rb phil.pizlo


#preflight 63138222e11efde08fc159a9

[CL 21826267 by andy sonnenburg in ue5-main branch]
2022-09-06 15:02:33 -04:00