Files
mikko mononen 9841195afe SmartObject: Improved validation settings
- Added SmartObjectUserComponent which allows to define validation settings per user actor
- Added option to SO defintion to have preview validation settings or preview user actor (settings pulled from SO user component)
- Move parameters passed to SO annotation CollectDataForGameplayDebugger() into a struct
- Changed USmartObjectSlotValidationFilter to have 2 sets of validation parameters to allow exits to have looser validation
- Changed the API for setting params from Actor in FSmartObjectSlotEntranceLocationRequest (still meh)

#jira UE-174418
#preflight 642173f8a86ae7cbcc25ab0b

[CL 24801238 by mikko mononen in ue5-main branch]
2023-03-27 08:22:19 -04:00

35 lines
1.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Components/ActorComponent.h"
#include "SmartObjectTypes.h"
#include "SmartObjectUserComponent.generated.h"
/**
* Smart Object User Component defines common settings for a Smart Object user.
*
* The validation settings for entries and exits are separate to allow to have more lax exit settings.
* For example the entry settings might prevent to use Smart Object slots which are on water, but we could allow to exit in water.
*/
UCLASS(Blueprintable, ClassGroup = Gameplay, meta = (BlueprintSpawnableComponent), config = Game, HideCategories = (Activation, AssetUserData, Collision, Cooking, HLOD, Lighting, LOD, Mobile, Mobility, Navigation, Physics, RayTracing, Rendering, Tags, TextureStreaming))
class SMARTOBJECTSMODULE_API USmartObjectUserComponent : public UActorComponent
{
GENERATED_BODY()
public:
explicit USmartObjectUserComponent(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
/** @return validation filter to be used for entries. */
TSubclassOf<USmartObjectSlotValidationFilter> GetValidationFilter() const
{
return ValidationFilter;
}
protected:
/** Validation filter used for entering testing entries for a Smart Object slot. */
UPROPERTY(EditAnywhere, Category = "SmartObject", BlueprintReadWrite)
TSubclassOf<USmartObjectSlotValidationFilter> ValidationFilter = nullptr;
};