// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Components/ActorComponent.h" #include "NiagaraSystem.h" #include "FXEnum.h" #include "FXComponent.generated.h" UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) ) class ZWORLD_API UFXComponent : public UActorComponent { GENERATED_BODY() public: // Sets default values for this component's properties UFXComponent(); protected: // Called when the game starts virtual void BeginPlay() override; public: // Called every frame virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override; UFUNCTION(BlueprintCallable, Category = "FX Component") UObject* PlayFX(UObject* FXAsset, USceneComponent* MeshComp, FName SocketName, FVector LocalOffset, FRotator LocalRotation, int32 DataChannelCount, FFXSpawnInfo SpawnInfo); //void test(UNiagaraSystem* SystemTemplate, USceneComponent* AttachToComponent, FName AttachPointName, FVector Location, FRotator Rotation, FFXSpawnInfo SpawnInfo) {}; static UNiagaraComponent* SpawnSystemAttached(UNiagaraSystem* SystemTemplate, USceneComponent* AttachToComponent, FName AttachPointName, FVector Location, FRotator Rotation, FFXSpawnInfo SpawnInfo); };