Commit Graph

2265 Commits

Author SHA1 Message Date
Steve Robb
54a578a7cd Replaced some != loop boundary tests with < to workaround false positives in MSVC's static analyser.
#rb trivial
#jira UE-170580
#preflight none
#fyi joe.kirchoff

[CL 23219395 by Steve Robb in ue5-main branch]
2022-11-21 07:25:31 -05:00
henrik karlsson
b5164ac775 Fixes to make modules compile with IWYU. We've added to IWYU toolchain so it compiles "orphaned" headers which does not have a owning cpp file. This identified lots of headers that couldn't be compiled by themselves (or if they were to included first)
Change consist of only forward declaration and additional includes

#preflight 63789c1de30d438849c48188
#rb none

[CL 23218412 by henrik karlsson in ue5-main branch]
2022-11-21 03:22:23 -05:00
steve robb
21e8d56a94 Improved comments on SerializeBin() and SerializeBinEx() to make it clear that binary serialization of deprecated properties can cause problems.
Made FProperty::ShouldSerializeValue() easier to debug for why a property is skipped.

#rb robert.manuszewski
#jira UE-170259
#preflight 6372e660b663683828915ccd

[CL 23153394 by steve robb in ue5-main branch]
2022-11-16 09:18:24 -05:00
Tim Smith
9f52c3aa2d Fix to allow settings objects to be properly handled by LiveCoding and HotReload.
#rb matt.peters
#jira UE-169808
#preflight 6373dbaf232e3d12cbd1e9a0

[CL 23139425 by Tim Smith in ue5-main branch]
2022-11-15 13:39:47 -05:00
andrew scheidecker
0d7f15c26f Enable the garbage collector to find UObjects that might be referenced by FDynamicallyTypedValueType.
#preflight 636e3faa953c19d4353c4c24
#rb Robert.Manuszewski

[CL 23134311 by andrew scheidecker in ue5-main branch]
2022-11-15 07:40:17 -05:00
henrik karlsson
5b96352978 Fixes for c++ headerunits/modules.
* Adding forward declarations
* Adding "inline" in front of const/constexpr variables in headers
* Adding includes
* A few moves of ctor/dtor to cpp file

#preflight 6372b3ac0c74adb48b49f313
#rb none

[CL 23130896 by henrik karlsson in ue5-main branch]
2022-11-14 19:59:41 -05:00
Andrew Rodham
8405a0c1b0 Fixed struct alignment not being used by FStructOnScope
#jira none
#rb Steve.Robb, Danny.Couture
#preflight 6372811c953c19d43526f994

[CL 23122879 by Andrew Rodham in ue5-main branch]
2022-11-14 14:01:34 -05:00
Matt Peters
ebc8986b2e BulkDataRegistry: Compute the actual PayloadId and put it into the BulkDataRegistryPayloadId cache whenever the Payload is loaded for an EditorBulkData with a PlaceholderPayloadId. Issuing Puts in this case causes future Gets to not miss; spurious misses are expensive in the DDC cache and break our analytics. Previously we would Put only when we demanded the actual Payload Id from the build system, but this did not cover all BulkDatas for which we issue Gets, since we issue Gets speculatively without knowing for sure whether the PayloadId will be needed.
#rb Zousar.Shaker, Paul.Chipchase
#rnx
#preflight 63727a7eb663683828718abb

[CL 23121107 by Matt Peters in ue5-main branch]
2022-11-14 12:42:50 -05:00
zhikang shao
1d9c60ec99 FFieldPath now respects CoreRedirects.
#jira UE-162160 #jira UE-142887 #rb ben.zeigler #rb benjamin.fox
FFieldPathProperty applies redirects on ImportText_Internal, automatically redirecting FFieldPath saved in string format for blueprint graph pins.
FGameplayAttribute applies redirects after deserializing unredirected value and fixes up derived properties, for UObject based assets with FGameplayAttribute properties.
UAttributeSet subclass renaming and adding ClassRedirect works now. Previously, FGameplayAttribute pins would show correct value in blueprint graphs but use incorrect value at runtime.
FGameplayAttribute renaming and adding PropertyRedirect works now. Previously, FGameplayAttribute fields in blueprint assets would break (null out), in addition to blueprint graphs using undirected value at runtime.
#preflight 636e638e8f4cb2e4dcf00c05

[CL 23098214 by zhikang shao in ue5-main branch]
2022-11-11 10:55:46 -05:00
nick darnell
3845a7f3a6 Editor - Introducing a new helper utility class, FWarnIfAssetsLoadedInScope exists in CoreUObject so that it can be used in lots of places, but it will only work in Editor builds, so it is marked as such. It allows you to throw a scope around some code to detect unexpected asset loads during that scope and then emit them as errors in the editor. It wont warn anyone that doesn't have -WarnIfAssetsLoaded in their commandline. It's a great little debugging utility when you're trying to prevent unexpected hitches from being introduced into the editor from unnessesary loads.
#jira UE-165574

[CL 23071814 by nick darnell in ue5-main branch]
2022-11-10 01:08:11 -05:00
nick darnell
51a6763dca FAssetData - You can now pass in EResolveClass::Yes or EResolveClass::No, into GetClass and IsInstanceOf on FAssetData in order to ask it to load classes that it can't find.
#jira UE-165574

[CL 23071802 by nick darnell in ue5-main branch]
2022-11-10 01:07:46 -05:00
henrik karlsson
4feb09e0b3 Compile time optimizations Managed to reduce unnamed game's biggest file compiler frontend cost from 113 seconds to 60 seconds. This also impact other things such as pch size and memory footprint when compiling which is great.
Takeaways. Try to use "friend" on functions/operators that are frequently overloaded EXCEPT if they are in a templated type that is frequently instantiated. So do not put friends in TMap, TSet, TObjectPtr etc, this will slow down compile times. There is a break-even somewhere and hard to tell where it is but taking a class that is templatized on character type probably don't matter either way and then it is nicer to use a friend since that simplies error messages when compiler can't resolve functions/operators.

If it is possible to use member functions instead of friend that is the best option in terms of compile time performance. With c++20 you only have to write operator==(Foo, Bar) and the compiler will automatically provide operator==(Bar, Foo), operator!=(Foo, Bar) and operator!=(Bar, Foo).

Changes in this changelist involes
* Making operator<< friends in non-template types and not friends in template types
* Making operator==/!= members where possible and if not possible moved out if type is a frequently instantiated templated type.

#preflight 636970f5376a9cd6a80da54a
#rb steve.robb

[CL 23038965 by henrik karlsson in ue5-main branch]
2022-11-08 15:59:46 -05:00
henrik karlsson
f4adba584c Fixed compile error in BulkData.h caused by integration
#rb none
#jira none
#preflight skipped

[CL 22968274 by henrik karlsson in ue5-main branch]
2022-11-03 17:57:06 -04:00
henrik karlsson
b985fbd1b1 Removed lots of includes in high traffic headers in order to reduce compile times. Headers are still included if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2 is set to 1
List of highlights
* PlayerController - Removed ForceFeedback and and OnlineReplStructs
* Class - Removed Package.h
* World - Pawn, Blueprint and GameInstance
* Actor - CoreNet, HitResult and ActorDatalayer
* EngineBaseTypes - TaskGraphInterface
* AssetManager - AssetData
* Scene/Child/ActorComponent - CoreNet
* AnimInstance - AttributesRuntime, Skeleton, AnimCurveTypes, AnimMontage, BonePose
* BulkData - IoDispatcher
* AssetData - IoDispatcher, LinkerLoad
* SecureHash - AsyncWork
* CanvasTypes - UnrealEngine, StaticMeshResources
* IpAddress - AsyncWork, Stats

#preflight 6363717ece676ae8688f5d8c
#rb none

[CL 22968258 by henrik karlsson in ue5-main branch]
2022-11-03 17:56:44 -04:00
joe pribele
50cfdde358 [CoreUObject] changed to check for null in TObjectPtr.GetPathName()
#preflight 63643317de2c4dbb5d47122c

[CL 22968073 by joe pribele in ue5-main branch]
2022-11-03 17:47:24 -04:00
Zousar Shaker
7a0beed2f7 2nd submit after fixing breakages in other streams:
Disallow TObjectPtr use on complete non-UObject derived types.

#rb devin.doucette
#preflight 63633a910c2e7c8f91d2e4e9

[CL 22966926 by Zousar Shaker in ue5-main branch]
2022-11-03 17:12:08 -04:00
ben hoffman
ac0136ab29 Add The Input Device trigger enum to the IInputInterface and as a noexport blueprint type. This will allow you to specify which trigger should recieve effects like resistence, feedback, vibration, etc.
#jira UE-158873
#rb David.Harvey
#rnx
#preflight 6362a0889160784fc31a9429

[CL 22961379 by ben hoffman in ue5-main branch]
2022-11-03 15:02:03 -04:00
Zousar Shaker
9ebb9da0b5 [Backout] - CL22952808
#fyi Zousar.Shaker
Original CL Desc
-----------------------------------------------------------------
Disallow TObjectPtr use on complete non-UObject derived types.

#rb devin.doucette
#preflight 63633a910c2e7c8f91d2e4e9

[CL 22953432 by Zousar Shaker in ue5-main branch]
2022-11-03 10:59:07 -04:00
Zousar Shaker
828ced0b2a Disallow TObjectPtr use on complete non-UObject derived types.
#rb devin.doucette
#preflight 63633a910c2e7c8f91d2e4e9

[CL 22952808 by Zousar Shaker in ue5-main branch]
2022-11-03 10:28:34 -04:00
NEdwards-Sharkmob
f2b8376be6 PR #9698: Adding missing script macros for weak object properties.
#rnx
#rb Robert.Manuszewski
#preflight 6363cbb71052c15f13845c6a

[CL 22952772 by NEdwards-Sharkmob in ue5-main branch]
2022-11-03 10:26:35 -04:00
scott nelson
8a674181f8 Add Ability to provide Default PackageFlags to each mount point during CreatePackage
#rb Francis.Hurteau
#preflight 6361809f1a32af63a89cb229

[CL 22918043 by scott nelson in ue5-main branch]
2022-11-02 11:48:28 -04:00
henrik karlsson
4a36cfe8ff Moved operator== to be hidden friend instead of put directly in global namespace
Moved GetTypeHash function to be hidden friend instead of put directly in global namespace.

Note that the function/operator needs to be fully inlined in the type or placed in the cpp. If the function is added as friend but then implemented outside the type then hidden friend optimization won't work.

This should improve compile time somewhat according to msvc devs.

#rb Steve.Robb
#preflight 6360b7052b5338aceb26471b

[CL 22889837 by henrik karlsson in ue5-main branch]
2022-11-01 15:50:27 -04:00
robert manuszewski
6dc32674ac Adding FPackageName::GetContentPathForPackageRoot to be able to get the filesystem path (e.g. D:/Project/Engine/Content) of a given package root (e.g. /Engine/)
#rb Steve.Robb
#preflight 6360c64663608aee36d1a954

[CL 22888595 by robert manuszewski in ue5-main branch]
2022-11-01 15:08:10 -04:00
edwin maynard
2f2e641dd0 [Backout] - CL22878456 (Backed out due to CIS issues)
[FYI] Robert.Manuszewski
Original CL Desc
-----------------------------------------------------------------
Adding FPackageName::GetContentPathForPackageRoot to be able to get the filesystem path (e.g. D:/Project/Engine/Content) of a given package root (e.g. /Engine/)

#rb Steve.Robb
#preflight 6360c64663608aee36d1a954

[CL 22888588 by edwin maynard in ue5-main branch]
2022-11-01 15:08:01 -04:00
robert manuszewski
263c23a1dc Adding FPackageName::GetContentPathForPackageRoot to be able to get the filesystem path (e.g. D:/Project/Engine/Content) of a given package root (e.g. /Engine/)
#rb Steve.Robb
#preflight 6360c64663608aee36d1a954

[CL 22888560 by robert manuszewski in ue5-main branch]
2022-11-01 15:07:16 -04:00