small fixes for deprecations in 5.1

This commit is contained in:
Manuel Wagner 2022-08-23 17:30:42 +02:00
parent 97c5d9ed57
commit 4f72859cd0
15 changed files with 33 additions and 28 deletions

View File

@ -298,4 +298,8 @@ ManualIPAddress=
[URL] [URL]
GameName=LyraStarterGame GameName=LyraStarterGame
[/Script/NavigationSystem.RecastNavMesh]
bDrawPolyEdges=True
[CoreRedirects]
+ClassRedirects=(OldName="/Script/ShooterCore.InputTriggerComboAction", NewName="/Script/ShooterCore.LyraInputTriggerComboAction")

View File

@ -4,7 +4,7 @@
#include "EnhancedPlayerInput.h" #include "EnhancedPlayerInput.h"
#include "Engine/World.h" #include "Engine/World.h"
ETriggerState UInputTriggerComboAction::UpdateState_Implementation(const UEnhancedPlayerInput* PlayerInput, FInputActionValue ModifiedValue, float DeltaTime) ETriggerState ULyraInputTriggerComboAction::UpdateState_Implementation(const UEnhancedPlayerInput* PlayerInput, FInputActionValue ModifiedValue, float DeltaTime)
{ {
const UWorld* World = PlayerInput->GetWorld(); const UWorld* World = PlayerInput->GetWorld();
if (!World || !ComboStep.DependentAction) if (!World || !ComboStep.DependentAction)
@ -35,7 +35,7 @@ ETriggerState UInputTriggerComboAction::UpdateState_Implementation(const UEnhanc
return ETriggerState::None; return ETriggerState::None;
} }
FString UInputTriggerComboAction::GetDebugState() const FString ULyraInputTriggerComboAction::GetDebugState() const
{ {
return FString::Printf(TEXT("Last Activation:%.2f"), LastActivationTime); return FString::Printf(TEXT("Last Activation:%.2f"), LastActivationTime);
} }

View File

@ -1,4 +1,5 @@
// Copyright Epic Games, Inc. All Rights Reserved. // Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "InputTriggers.h" #include "InputTriggers.h"
@ -34,7 +35,7 @@ public:
* This will be triggered when all dependent actions have been triggered in order. * This will be triggered when all dependent actions have been triggered in order.
*/ */
UCLASS(NotBlueprintable, MinimalAPI, meta = (DisplayName = "Combo Action", NotInputConfigurable = "true")) UCLASS(NotBlueprintable, MinimalAPI, meta = (DisplayName = "Combo Action", NotInputConfigurable = "true"))
class UInputTriggerComboAction final : public UInputTrigger class ULyraInputTriggerComboAction final : public UInputTrigger
{ {
GENERATED_BODY() GENERATED_BODY()

View File

@ -11,9 +11,9 @@
#include "UObject/UObjectIterator.h" #include "UObject/UObjectIterator.h"
#include "UObject/UObjectHash.h" #include "UObject/UObjectHash.h"
#include "UObject/Package.h" #include "UObject/Package.h"
#include "AssetData.h" #include "AssetRegistry/AssetData.h"
#include "AssetRegistryModule.h" #include "AssetRegistry/AssetRegistryModule.h"
#include "ARFilter.h" #include "AssetRegistry/ARFilter.h"
#include "SourceControlHelpers.h" #include "SourceControlHelpers.h"
#include "ISourceControlModule.h" #include "ISourceControlModule.h"
#include "ISourceControlState.h" #include "ISourceControlState.h"
@ -343,7 +343,7 @@ void UContentValidationCommandlet::GetAllPackagesOfType(const FString& OfTypeStr
for (const FString& Type : Types) for (const FString& Type : Types)
{ {
Filter.ClassNames.Add(FName(*Type)); Filter.ClassPaths.Add(FTopLevelAssetPath(Type));
} }
TArray<FAssetData> AssetsOfType; TArray<FAssetData> AssetsOfType;

View File

@ -152,7 +152,7 @@ static void RegisterGameEditorMenus()
FOnGetContent::CreateStatic(&AddLocalPlayer), FOnGetContent::CreateStatic(&AddLocalPlayer),
LOCTEXT("GameOptions_Label", "Game Options"), LOCTEXT("GameOptions_Label", "Game Options"),
LOCTEXT("GameOptions_ToolTip", "Game Options"), LOCTEXT("GameOptions_ToolTip", "Game Options"),
FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.OpenLevelBlueprint") FSlateIcon(FAppStyle::GetAppStyleSetName(), "LevelEditor.OpenLevelBlueprint")
); );
BlueprintEntry.StyleNameOverride = "CalloutToolbar"; BlueprintEntry.StyleNameOverride = "CalloutToolbar";
Section.AddEntry(BlueprintEntry); Section.AddEntry(BlueprintEntry);

View File

@ -2,7 +2,7 @@
#include "LyraEditor.h" #include "LyraEditor.h"
#include "AssetRegistryModule.h" #include "AssetRegistry/AssetRegistryModule.h"
#include "HAL/IConsoleManager.h" #include "HAL/IConsoleManager.h"
#include "Engine/StaticMesh.h" #include "Engine/StaticMesh.h"

View File

@ -2,7 +2,7 @@
#include "LyraEditor.h" #include "LyraEditor.h"
#include "AssetRegistryModule.h" #include "AssetRegistry/AssetRegistryModule.h"
#include "CollectionManagerTypes.h" #include "CollectionManagerTypes.h"
#include "ICollectionManager.h" #include "ICollectionManager.h"

View File

@ -2,7 +2,7 @@
#include "LyraEditor.h" #include "LyraEditor.h"
#include "AssetRegistryModule.h" #include "AssetRegistry/AssetRegistryModule.h"
#include "CollectionManagerTypes.h" #include "CollectionManagerTypes.h"
#include "ICollectionManager.h" #include "ICollectionManager.h"

View File

@ -1,8 +1,8 @@
// Copyright Epic Games, Inc. All Rights Reserved. // Copyright Epic Games, Inc. All Rights Reserved.
#include "EditorValidator.h" #include "EditorValidator.h"
#include "AssetData.h" #include "AssetRegistry/AssetData.h"
#include "AssetRegistryModule.h" #include "AssetRegistry/AssetRegistryModule.h"
#include "Logging/MessageLog.h" #include "Logging/MessageLog.h"
#include "MessageLogModule.h" #include "MessageLogModule.h"
#include "Misc/ConfigCacheIni.h" #include "Misc/ConfigCacheIni.h"
@ -435,16 +435,16 @@ void UEditorValidator::GetChangedAssetsForCode(IAssetRegistry& AssetRegistry, co
if (UClass* ModifiedClass = ModifiedClassPtr.Get()) if (UClass* ModifiedClass = ModifiedClassPtr.Get())
{ {
// This finds all native derived blueprints, both direct subclasses, or subclasses of subclasses. // This finds all native derived blueprints, both direct subclasses, or subclasses of subclasses.
TSet<FName> DerivedClassNames; TSet<FTopLevelAssetPath> DerivedClassNames;
TArray<FName> ClassNames; TArray<FTopLevelAssetPath> ClassNames;
ClassNames.Add(ModifiedClass->GetFName()); ClassNames.Add(ModifiedClass->GetClassPathName());
AssetRegistry.GetDerivedClassNames(ClassNames, TSet<FName>(), DerivedClassNames); AssetRegistry.GetDerivedClassNames(ClassNames, TSet<FTopLevelAssetPath>(), DerivedClassNames);
UE_LOG(LogLyraEditor, Display, TEXT("Validating Subclasses of %s in %s + %s"), *ModifiedClass->GetName(), *ChangedHeaderModule, *ChangedHeaderReleativeToModule); UE_LOG(LogLyraEditor, Display, TEXT("Validating Subclasses of %s in %s + %s"), *ModifiedClass->GetName(), *ChangedHeaderModule, *ChangedHeaderReleativeToModule);
FARFilter Filter; FARFilter Filter;
Filter.bRecursiveClasses = true; Filter.bRecursiveClasses = true;
Filter.ClassNames.Add(UBlueprintCore::StaticClass()->GetFName()); Filter.ClassPaths.Add(UBlueprintCore::StaticClass()->GetClassPathName());
// We enumerate all assets to find any blueprints who inherit from native classes directly - or // We enumerate all assets to find any blueprints who inherit from native classes directly - or
// from other blueprints. // from other blueprints.
@ -460,7 +460,7 @@ void UEditorValidator::GetChangedAssetsForCode(IAssetRegistry& AssetRegistry, co
{ {
const FString ClassObjectPath = FPackageName::ExportTextPathToObjectPath(ClassFromData); const FString ClassObjectPath = FPackageName::ExportTextPathToObjectPath(ClassFromData);
const FString ClassName = FPackageName::ObjectPathToObjectName(ClassObjectPath); const FString ClassName = FPackageName::ObjectPathToObjectName(ClassObjectPath);
if (DerivedClassNames.Contains(FName(*ClassName))) if (DerivedClassNames.Contains(FTopLevelAssetPath(ClassName)))
{ {
UE_LOG(LogLyraEditor, Display, TEXT("\tAdding %s To Validate"), *PackageName); UE_LOG(LogLyraEditor, Display, TEXT("\tAdding %s To Validate"), *PackageName);

View File

@ -4,7 +4,7 @@
#include "Engine/Blueprint.h" #include "Engine/Blueprint.h"
#include "Blueprint/BlueprintSupport.h" #include "Blueprint/BlueprintSupport.h"
#include "Kismet2/BlueprintEditorUtils.h" #include "Kismet2/BlueprintEditorUtils.h"
#include "AssetRegistryModule.h" #include "AssetRegistry/AssetRegistryModule.h"
#include "Validation/EditorValidator_Load.h" #include "Validation/EditorValidator_Load.h"
#include "LyraEditor.h" #include "LyraEditor.h"

View File

@ -3,7 +3,7 @@
#include "EditorValidator_MaterialFunctions.h" #include "EditorValidator_MaterialFunctions.h"
#include "Materials/MaterialFunction.h" #include "Materials/MaterialFunction.h"
#include "Materials/Material.h" #include "Materials/Material.h"
#include "AssetRegistryModule.h" #include "AssetRegistry/AssetRegistryModule.h"
#include "Validation/EditorValidator_Load.h" #include "Validation/EditorValidator_Load.h"
#include "LyraEditor.h" #include "LyraEditor.h"
@ -71,7 +71,7 @@ EDataValidationResult UEditorValidator_MaterialFunctions::ValidateLoadedAsset_Im
AssetRegistry.GetAssetsByPackageName(HardReferencer, ReferencerAssets, true); AssetRegistry.GetAssetsByPackageName(HardReferencer, ReferencerAssets, true);
for (const FAssetData& ReferencerAssetData : ReferencerAssets) for (const FAssetData& ReferencerAssetData : ReferencerAssets)
{ {
if (ReferencerAssetData.AssetClass == UMaterial::StaticClass()->GetFName()) if (ReferencerAssetData.AssetClassPath == UMaterial::StaticClass()->GetClassPathName())
{ {
UE_LOG(LogLyraEditor, Display, TEXT(" Loading referencing material %s"), *HardReferencerStr); UE_LOG(LogLyraEditor, Display, TEXT(" Loading referencing material %s"), *HardReferencerStr);

View File

@ -1,8 +1,8 @@
// Copyright Epic Games, Inc. All Rights Reserved. // Copyright Epic Games, Inc. All Rights Reserved.
#include "EditorValidator_SourceControl.h" #include "EditorValidator_SourceControl.h"
#include "AssetData.h" #include "AssetRegistry/AssetData.h"
#include "AssetRegistryModule.h" #include "AssetRegistry/AssetRegistryModule.h"
#include "SourceControlOperations.h" #include "SourceControlOperations.h"
#include "ISourceControlProvider.h" #include "ISourceControlProvider.h"
#include "ISourceControlModule.h" #include "ISourceControlModule.h"

View File

@ -100,7 +100,7 @@ void ULyraGameplayAbility_Interact::TriggerInteraction()
// Grab the target actor off the payload we're going to use it as the 'avatar' for the interaction, and the // Grab the target actor off the payload we're going to use it as the 'avatar' for the interaction, and the
// source InteractableTarget actor as the owner actor. // source InteractableTarget actor as the owner actor.
AActor* TargetActor = const_cast<AActor*>(Payload.Target); AActor* TargetActor = const_cast<AActor*>(Payload.Target.Get());
// The actor info needed for the interaction. // The actor info needed for the interaction.
FGameplayAbilityActorInfo ActorInfo; FGameplayAbilityActorInfo ActorInfo;

View File

@ -131,7 +131,7 @@ void UAbilityTask_WaitForInteractableTargets::UpdateInteractableOptions(const FI
if (InteractionAbilitySpec) if (InteractionAbilitySpec)
{ {
// update the option // update the option
Option.TargetAbilitySystem = AbilitySystemComponent; Option.TargetAbilitySystem = AbilitySystemComponent.Get();
Option.TargetInteractionAbilityHandle = InteractionAbilitySpec->Handle; Option.TargetInteractionAbilityHandle = InteractionAbilitySpec->Handle;
} }
} }

View File

@ -3,7 +3,7 @@
#include "LyraDevelopmentStatics.h" #include "LyraDevelopmentStatics.h"
#include "Development/LyraDeveloperSettings.h" #include "Development/LyraDeveloperSettings.h"
#include "Engine/Engine.h" #include "Engine/Engine.h"
#include "AssetRegistryModule.h" #include "AssetRegistry/AssetRegistryModule.h"
bool ULyraDevelopmentStatics::ShouldSkipDirectlyToGameplay() bool ULyraDevelopmentStatics::ShouldSkipDirectlyToGameplay()
{ {
@ -86,7 +86,7 @@ TArray<FAssetData> ULyraDevelopmentStatics::GetAllBlueprints()
TArray<FAssetData> BlueprintList; TArray<FAssetData> BlueprintList;
FARFilter Filter; FARFilter Filter;
Filter.ClassNames.Add(UBlueprint::StaticClass()->GetFName()); Filter.ClassPaths.Add(UBlueprint::StaticClass()->GetClassPathName());
Filter.bRecursivePaths = true; Filter.bRecursivePaths = true;
AssetRegistryModule.Get().GetAssets(Filter, BlueprintList); AssetRegistryModule.Get().GetAssets(Filter, BlueprintList);