// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "Subsystems/WorldSubsystem.h" #include "Engine/DeveloperSettings.h" #include "GameplayTagContainer.h" #include "PhysicalMaterials/PhysicalMaterial.h" #include "LyraContextEffectsSubsystem.generated.h" class ULyraContextEffectsLibrary; class UNiagaraComponent; /** * */ UCLASS(config = Game, defaultconfig, meta = (DisplayName = "LyraContextEffects")) class LYRAGAME_API ULyraContextEffectsSettings : public UDeveloperSettings { GENERATED_BODY() public: // UPROPERTY(config, EditAnywhere) TMap, FGameplayTag> SurfaceTypeToContextMap; }; /** * */ UCLASS() class LYRAGAME_API ULyraContextEffectsSet : public UObject { GENERATED_BODY() public: UPROPERTY(Transient) TSet LyraContextEffectsLibraries; }; /** * */ UCLASS() class LYRAGAME_API ULyraContextEffectsSubsystem : public UWorldSubsystem { GENERATED_BODY() public: /** */ UFUNCTION(BlueprintCallable, Category = "ContextEffects") void SpawnContextEffects( const AActor* SpawningActor , USceneComponent* AttachToComponent , const FName AttachPoint , const FVector LocationOffset , const FRotator RotationOffset , FGameplayTag Effect , FGameplayTagContainer Contexts , TArray& AudioOut , TArray& NiagaraOut , FVector VFXScale = FVector(1) , float AudioVolume = 1 , float AudioPitch = 1); /** */ UFUNCTION(BlueprintCallable, Category = "ContextEffects") bool GetContextFromSurfaceType(TEnumAsByte PhysicalSurface, FGameplayTag& Context); /** */ UFUNCTION(BlueprintCallable, Category = "ContextEffects") void LoadAndAddContextEffectsLibraries(AActor* OwningActor, TSet> ContextEffectsLibraries); /** */ UFUNCTION(BlueprintCallable, Category = "ContextEffects") void UnloadAndRemoveContextEffectsLibraries(AActor* OwningActor); private: UPROPERTY(Transient) TMap ActiveActorEffectsMap; };