From 4f72859cd0817824e8807589f1635f1539bcf15a Mon Sep 17 00:00:00 2001 From: Manuel Wagner Date: Tue, 23 Aug 2022 17:30:42 +0200 Subject: [PATCH] small fixes for deprecations in 5.1 --- Config/DefaultEngine.ini | 4 ++++ .../Private/Input/InputTriggerCombo.cpp | 4 ++-- .../Public/Input/InputTriggerCombo.h | 3 ++- .../Commandlets/ContentValidationCommandlet.cpp | 8 ++++---- Source/LyraEditor/LyraEditor.cpp | 2 +- .../Utilities/CheckChaosMeshCollision.cpp | 2 +- .../Utilities/CreateRedirectorPackage.cpp | 2 +- .../Utilities/DiffCollectionReferenceSupport.cpp | 2 +- Source/LyraEditor/Validation/EditorValidator.cpp | 16 ++++++++-------- .../Validation/EditorValidator_Blueprints.cpp | 2 +- .../EditorValidator_MaterialFunctions.cpp | 4 ++-- .../Validation/EditorValidator_SourceControl.cpp | 4 ++-- .../Abilities/LyraGameplayAbility_Interact.cpp | 2 +- .../AbilityTask_WaitForInteractableTargets.cpp | 2 +- .../LyraGame/System/LyraDevelopmentStatics.cpp | 4 ++-- 15 files changed, 33 insertions(+), 28 deletions(-) diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index ec965bf7..67e9c23e 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -298,4 +298,8 @@ ManualIPAddress= [URL] GameName=LyraStarterGame +[/Script/NavigationSystem.RecastNavMesh] +bDrawPolyEdges=True +[CoreRedirects] ++ClassRedirects=(OldName="/Script/ShooterCore.InputTriggerComboAction", NewName="/Script/ShooterCore.LyraInputTriggerComboAction") \ No newline at end of file diff --git a/Plugins/GameFeatures/ShooterCore/Source/ShooterCoreRuntime/Private/Input/InputTriggerCombo.cpp b/Plugins/GameFeatures/ShooterCore/Source/ShooterCoreRuntime/Private/Input/InputTriggerCombo.cpp index 2685ff2e..364d290a 100644 --- a/Plugins/GameFeatures/ShooterCore/Source/ShooterCoreRuntime/Private/Input/InputTriggerCombo.cpp +++ b/Plugins/GameFeatures/ShooterCore/Source/ShooterCoreRuntime/Private/Input/InputTriggerCombo.cpp @@ -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); } \ No newline at end of file diff --git a/Plugins/GameFeatures/ShooterCore/Source/ShooterCoreRuntime/Public/Input/InputTriggerCombo.h b/Plugins/GameFeatures/ShooterCore/Source/ShooterCoreRuntime/Public/Input/InputTriggerCombo.h index 9d8ac523..1f4065ad 100644 --- a/Plugins/GameFeatures/ShooterCore/Source/ShooterCoreRuntime/Public/Input/InputTriggerCombo.h +++ b/Plugins/GameFeatures/ShooterCore/Source/ShooterCoreRuntime/Public/Input/InputTriggerCombo.h @@ -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() diff --git a/Source/LyraEditor/Commandlets/ContentValidationCommandlet.cpp b/Source/LyraEditor/Commandlets/ContentValidationCommandlet.cpp index b798b916..acdf4d82 100644 --- a/Source/LyraEditor/Commandlets/ContentValidationCommandlet.cpp +++ b/Source/LyraEditor/Commandlets/ContentValidationCommandlet.cpp @@ -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 AssetsOfType; diff --git a/Source/LyraEditor/LyraEditor.cpp b/Source/LyraEditor/LyraEditor.cpp index 76307b91..352fa23a 100644 --- a/Source/LyraEditor/LyraEditor.cpp +++ b/Source/LyraEditor/LyraEditor.cpp @@ -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); diff --git a/Source/LyraEditor/Utilities/CheckChaosMeshCollision.cpp b/Source/LyraEditor/Utilities/CheckChaosMeshCollision.cpp index 1359b637..8e1a86ce 100644 --- a/Source/LyraEditor/Utilities/CheckChaosMeshCollision.cpp +++ b/Source/LyraEditor/Utilities/CheckChaosMeshCollision.cpp @@ -2,7 +2,7 @@ #include "LyraEditor.h" -#include "AssetRegistryModule.h" +#include "AssetRegistry/AssetRegistryModule.h" #include "HAL/IConsoleManager.h" #include "Engine/StaticMesh.h" diff --git a/Source/LyraEditor/Utilities/CreateRedirectorPackage.cpp b/Source/LyraEditor/Utilities/CreateRedirectorPackage.cpp index 692edfd4..dff1481c 100644 --- a/Source/LyraEditor/Utilities/CreateRedirectorPackage.cpp +++ b/Source/LyraEditor/Utilities/CreateRedirectorPackage.cpp @@ -2,7 +2,7 @@ #include "LyraEditor.h" -#include "AssetRegistryModule.h" +#include "AssetRegistry/AssetRegistryModule.h" #include "CollectionManagerTypes.h" #include "ICollectionManager.h" diff --git a/Source/LyraEditor/Utilities/DiffCollectionReferenceSupport.cpp b/Source/LyraEditor/Utilities/DiffCollectionReferenceSupport.cpp index 65e5aaf9..39560688 100644 --- a/Source/LyraEditor/Utilities/DiffCollectionReferenceSupport.cpp +++ b/Source/LyraEditor/Utilities/DiffCollectionReferenceSupport.cpp @@ -2,7 +2,7 @@ #include "LyraEditor.h" -#include "AssetRegistryModule.h" +#include "AssetRegistry/AssetRegistryModule.h" #include "CollectionManagerTypes.h" #include "ICollectionManager.h" diff --git a/Source/LyraEditor/Validation/EditorValidator.cpp b/Source/LyraEditor/Validation/EditorValidator.cpp index 1addd5ee..4fc518c6 100644 --- a/Source/LyraEditor/Validation/EditorValidator.cpp +++ b/Source/LyraEditor/Validation/EditorValidator.cpp @@ -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 DerivedClassNames; - TArray ClassNames; - ClassNames.Add(ModifiedClass->GetFName()); - AssetRegistry.GetDerivedClassNames(ClassNames, TSet(), DerivedClassNames); + TSet DerivedClassNames; + TArray ClassNames; + ClassNames.Add(ModifiedClass->GetClassPathName()); + AssetRegistry.GetDerivedClassNames(ClassNames, TSet(), 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); diff --git a/Source/LyraEditor/Validation/EditorValidator_Blueprints.cpp b/Source/LyraEditor/Validation/EditorValidator_Blueprints.cpp index 953cb86d..c1e961f8 100644 --- a/Source/LyraEditor/Validation/EditorValidator_Blueprints.cpp +++ b/Source/LyraEditor/Validation/EditorValidator_Blueprints.cpp @@ -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" diff --git a/Source/LyraEditor/Validation/EditorValidator_MaterialFunctions.cpp b/Source/LyraEditor/Validation/EditorValidator_MaterialFunctions.cpp index 293f3c5b..516fc81a 100644 --- a/Source/LyraEditor/Validation/EditorValidator_MaterialFunctions.cpp +++ b/Source/LyraEditor/Validation/EditorValidator_MaterialFunctions.cpp @@ -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); diff --git a/Source/LyraEditor/Validation/EditorValidator_SourceControl.cpp b/Source/LyraEditor/Validation/EditorValidator_SourceControl.cpp index b5fe4bef..1e2a1d0e 100644 --- a/Source/LyraEditor/Validation/EditorValidator_SourceControl.cpp +++ b/Source/LyraEditor/Validation/EditorValidator_SourceControl.cpp @@ -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" diff --git a/Source/LyraGame/Interaction/Abilities/LyraGameplayAbility_Interact.cpp b/Source/LyraGame/Interaction/Abilities/LyraGameplayAbility_Interact.cpp index 5bbe7f51..b5a013ec 100644 --- a/Source/LyraGame/Interaction/Abilities/LyraGameplayAbility_Interact.cpp +++ b/Source/LyraGame/Interaction/Abilities/LyraGameplayAbility_Interact.cpp @@ -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(Payload.Target); + AActor* TargetActor = const_cast(Payload.Target.Get()); // The actor info needed for the interaction. FGameplayAbilityActorInfo ActorInfo; diff --git a/Source/LyraGame/Interaction/Tasks/AbilityTask_WaitForInteractableTargets.cpp b/Source/LyraGame/Interaction/Tasks/AbilityTask_WaitForInteractableTargets.cpp index b98ee7ee..3de46c22 100644 --- a/Source/LyraGame/Interaction/Tasks/AbilityTask_WaitForInteractableTargets.cpp +++ b/Source/LyraGame/Interaction/Tasks/AbilityTask_WaitForInteractableTargets.cpp @@ -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; } } diff --git a/Source/LyraGame/System/LyraDevelopmentStatics.cpp b/Source/LyraGame/System/LyraDevelopmentStatics.cpp index 68b2d783..5e0f282f 100644 --- a/Source/LyraGame/System/LyraDevelopmentStatics.cpp +++ b/Source/LyraGame/System/LyraDevelopmentStatics.cpp @@ -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 ULyraDevelopmentStatics::GetAllBlueprints() TArray BlueprintList; FARFilter Filter; - Filter.ClassNames.Add(UBlueprint::StaticClass()->GetFName()); + Filter.ClassPaths.Add(UBlueprint::StaticClass()->GetClassPathName()); Filter.bRecursivePaths = true; AssetRegistryModule.Get().GetAssets(Filter, BlueprintList);