You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Change the blueprint action database to refresh type promotion instead of doing it from the module change callback.
This ensures the type promotion is refreshed right before it is needed and avoids redundant refreshes when multiple modules load at once. #rb ben.hoffman [CL 27177959 by ben zeigler in ue5-main branch]
This commit is contained in:
@@ -1365,6 +1365,10 @@ void FBlueprintActionDatabase::Tick(float DeltaTime)
|
||||
{
|
||||
RefreshAll();
|
||||
}
|
||||
else if (!BlueprintActionDatabaseImpl::PendingModules.IsEmpty())
|
||||
{
|
||||
PreRefresh(false);
|
||||
}
|
||||
|
||||
// Check for any modules that may have been loaded since the last tick. Even if we call RefreshAll() above, we still want to run
|
||||
// through this list in order to keep track of loaded modules containing native script types that are registered into the database.
|
||||
@@ -1500,6 +1504,9 @@ void FBlueprintActionDatabase::RefreshAll()
|
||||
TGuardValue<bool> ScopedInitialization(BlueprintActionDatabaseImpl::bIsInitializing, true);
|
||||
BlueprintActionDatabaseImpl::bRefreshAllRequested = false;
|
||||
|
||||
// Refresh other systems before the database is recreated
|
||||
PreRefresh(true);
|
||||
|
||||
// Remove callbacks from blueprints
|
||||
for (TObjectIterator<UBlueprint> BlueprintIt; BlueprintIt; ++BlueprintIt)
|
||||
{
|
||||
@@ -2002,6 +2009,12 @@ void FBlueprintActionDatabase::OnBlueprintChanged(UBlueprint* InBlueprint)
|
||||
}
|
||||
}
|
||||
|
||||
void FBlueprintActionDatabase::PreRefresh(bool bRefreshAll)
|
||||
{
|
||||
// Refresh other systems as necessary, doing it here avoids redundant work
|
||||
FTypePromotion::RefreshPromotionTables();
|
||||
}
|
||||
|
||||
bool FBlueprintActionDatabase::IsClassAllowed(UClass const* InClass, EPermissionsContext InContext)
|
||||
{
|
||||
if (InClass == nullptr)
|
||||
|
||||
Reference in New Issue
Block a user