FScopedSlowTask has been refactored to better allow for nesting of slow operations. This allows us to cascade nested scopes and provide accurate feedback on slow tasks. FScopedSlowTasks now work together when nested inside sub functions. Break up long functions that contain calls to multiple nested FScopedSlowTasks with FScopedSlowTask::EnterProgressFrame().
Example Usage:
void DoSlowWork()
{
FScopedSlowTask Progress(2.f, LOCTEXT("DoingSlowWork", "Doing Slow Work..."));
// Optionally make this show a dialog if not already shown
Progress.MakeDialog();
// Indicate that we are entering a frame representing 1 unit of work
Progress.EnterProgressFrame(1.f);
// DoFirstThing() can follow a similar pattern of creating a scope divided into frames. These contribute to their parent's progress frame proportionately.
DoFirstThing();
Progress.EnterProgressFrame(1.f);
DoSecondThing();
}
This addresses TTP#338602 - NEEDS REVIEW: Editor progress bars nearly always just show 100%, don't offer useful indication of progress
[CL 2322391 by Andrew Rodham in Main branch]
TTP #343071 CORE: FCoreDelegates should not have references to UObjects.
#codereview Robert.Manuszewski
[CL 2317144 by Mikolaj Sieluzycki in Main branch]
* Cast can be used for every UClass/interface cast:
- Up/down UObject hierarchy.
- From interfaces to UObjects.
- From UObjects to interfaces.
- Between interfaces.
* InterfaceCast has been deprecated.
* dynamic_cast can now be used instead of Cast.
* dynamic_cast between two UType pointers will be equivalent to Cast, but with dynamic_cast syntax and semantics.
* dynamic_cast of references is equivalent to a CastChecked - if it fails, it will fatally log rather than throw a std::bad_cast exception (UE doesn't support exceptions).
* If the two types involved are not UTypes, it should continue to act like a normal dynamic_cast.
* dynamic_cast<void*> works as expected.
* All/many Casts in CoreUObject changed to dynamic_cast to show this behaviour.
* Some refactoring.
#codereview robert.manuszewski,mike.fricker
[CL 2312800 by Steve Robb in Main branch]
#ttp 335628 - +CRITICAL: Regression: SHOOTERGAME: PIE as client only opens one player window
#branch UE4
#change Modified the clients PIEInstance (in this instance) to be -1, so that it uses normal assets (those determined by the server) and not the PIE ones otherwise the client will get kicked from the server. Made a slight change to prevent a call to BuildPIEPackagePrefix from crashing too.
#change Modified AsyncLoading to be able to specify the PackageFlags applied to the package, rather than assuming them based off the PIEInstanceID. LevelStreaming (which is the only place which utilised this) can now check the WorldContext to determine if the PKG_PlayInEditor PackageFlag should be set, rather than PIEInstanceID - which brings the code inline with the rest of the solution. Streaming levels only get unloaded if the package has this flag set (unloading doesn't care about PIEInstanceID, so it was odd that the flag was set based on this in the first place). Without this change, PIE clients would keep streaming levels around in memory which would break things later on.
[CL 2309599 by Andrew Brown in Main branch]
#change Added code to make sure the script package is created before UEnums and UStructs get registered
[CL 2306655 by Robert Manuszewski in Main branch]
Added a SerializeFromMismatchedTag to FSlateColor that can convert an FColor or FLinearColor property to an FSlateColor.
Had to update the logic for calling SerializeFromMismatchedTag so that it would also call it when the StructName in the Tag of a StructProperty had changed.
ReviewedBy Andrew.Rodham
[CL 2305436 by Jamie Dale in Main branch]