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]
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 "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();
if (!World || !ComboStep.DependentAction)
@ -35,7 +35,7 @@ ETriggerState UInputTriggerComboAction::UpdateState_Implementation(const UEnhanc
return ETriggerState::None;
}
FString UInputTriggerComboAction::GetDebugState() const
FString ULyraInputTriggerComboAction::GetDebugState() const
{
return FString::Printf(TEXT("Last Activation:%.2f"), LastActivationTime);
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,8 +1,8 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#include "EditorValidator.h"
#include "AssetData.h"
#include "AssetRegistryModule.h"
#include "AssetRegistry/AssetData.h"
#include "AssetRegistry/AssetRegistryModule.h"
#include "Logging/MessageLog.h"
#include "MessageLogModule.h"
#include "Misc/ConfigCacheIni.h"
@ -435,16 +435,16 @@ void UEditorValidator::GetChangedAssetsForCode(IAssetRegistry& AssetRegistry, co
if (UClass* ModifiedClass = ModifiedClassPtr.Get())
{
// This finds all native derived blueprints, both direct subclasses, or subclasses of subclasses.
TSet<FName> DerivedClassNames;
TArray<FName> ClassNames;
ClassNames.Add(ModifiedClass->GetFName());
AssetRegistry.GetDerivedClassNames(ClassNames, TSet<FName>(), DerivedClassNames);
TSet<FTopLevelAssetPath> DerivedClassNames;
TArray<FTopLevelAssetPath> ClassNames;
ClassNames.Add(ModifiedClass->GetClassPathName());
AssetRegistry.GetDerivedClassNames(ClassNames, TSet<FTopLevelAssetPath>(), DerivedClassNames);
UE_LOG(LogLyraEditor, Display, TEXT("Validating Subclasses of %s in %s + %s"), *ModifiedClass->GetName(), *ChangedHeaderModule, *ChangedHeaderReleativeToModule);
FARFilter Filter;
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
// from other blueprints.
@ -460,7 +460,7 @@ void UEditorValidator::GetChangedAssetsForCode(IAssetRegistry& AssetRegistry, co
{
const FString ClassObjectPath = FPackageName::ExportTextPathToObjectPath(ClassFromData);
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);

View File

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

View File

@ -3,7 +3,7 @@
#include "EditorValidator_MaterialFunctions.h"
#include "Materials/MaterialFunction.h"
#include "Materials/Material.h"
#include "AssetRegistryModule.h"
#include "AssetRegistry/AssetRegistryModule.h"
#include "Validation/EditorValidator_Load.h"
#include "LyraEditor.h"
@ -71,7 +71,7 @@ EDataValidationResult UEditorValidator_MaterialFunctions::ValidateLoadedAsset_Im
AssetRegistry.GetAssetsByPackageName(HardReferencer, ReferencerAssets, true);
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);

View File

@ -1,8 +1,8 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#include "EditorValidator_SourceControl.h"
#include "AssetData.h"
#include "AssetRegistryModule.h"
#include "AssetRegistry/AssetData.h"
#include "AssetRegistry/AssetRegistryModule.h"
#include "SourceControlOperations.h"
#include "ISourceControlProvider.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
// 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.
FGameplayAbilityActorInfo ActorInfo;

View File

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

View File

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