update niagara data channel

This commit is contained in:
Boshuang Zhao 2025-05-17 18:56:46 +08:00
parent b002042f5a
commit d99924d0b3
17 changed files with 87 additions and 2 deletions

4
.gitignore vendored
View File

@ -1,5 +1,6 @@
.vs
.vscode
.idea
Binaries
Intermediate
Content/AdvancedLocomotionV4
@ -11,6 +12,9 @@ Content/Table/*.ini
Content/Script/GameConfig/Table/*
Plugins/**/Binaries
Plugins/**/Intermediate
Plugins/Developer
Plugins/UnLua/Source/UnLuaDefaultParamCollectorUbtPlugin
Saved
*.sln
*.uproject

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -18,7 +18,7 @@
"Modules": [
{
"Name": "Sentry",
"Type": "Runtime",
"Type": "CookedOnly",
"LoadingPhase": "Default",
"WhitelistPlatforms": [ "Win64", "Mac", "Android", "IOS", "Linux", "LinuxArm64" ]
},

View File

@ -0,0 +1,37 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "CrashActor.h"
DEFINE_LOG_CATEGORY(LogCrash);
// Sets default values
ACrashActor::ACrashActor()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
}
// Called when the game starts or when spawned
void ACrashActor::BeginPlay()
{
Super::BeginPlay();
}
void TestCrash(int CrashFrame) {
auto FN = [=]() {
int* ptr = nullptr;
*ptr = CrashFrame + 6;
};
FN();
}
// Called every frame
void ACrashActor::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
CrashFrame = 200;
if (Frame++ >= CrashFrame) {
if (Frame == CrashFrame + 100) {
UE_LOG(LogTemp, Error, TEXT("ACrashActor:BeforeCrash"));
TestCrash(CrashFrame);
}
}
}

View File

@ -0,0 +1,30 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "CrashActor.generated.h"
UCLASS()
class ZWORLD_API ACrashActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
ACrashActor();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
UPROPERTY()
int Frame = 0;
UPROPERTY()
int CrashFrame = 666;
};
DECLARE_LOG_CATEGORY_EXTERN(LogCrash, Log, All);

View File

@ -48,7 +48,7 @@ UObject* UFXComponent::PlayFX(UObject* FXAsset, USceneComponent* MeshComp, FName
true, true, true, *GetOwner()->GetName());
if (auto NDCWriter = Cast<UNiagaraDataChannelWriter>(FXObject))
{
NDCWriter->WriteVector(UNameRegisterLibrary::Name_Position, 0, LocalOffset);
NDCWriter->WritePosition(UNameRegisterLibrary::Name_Position, 0, LocalOffset);
NDCWriter->WriteVector(UNameRegisterLibrary::Name_Rotation, 0, FVector(LocalRotation.Pitch, LocalRotation.Yaw, LocalRotation.Roll));
NDCWriter->WriteQuat(UNameRegisterLibrary::Name_Quaternion, 0, LocalRotation.Quaternion());
}

View File

@ -18,5 +18,19 @@
"Editor"
]
}
,
{
"Name": "Sentry",
"Enabled": true,
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/99f5c02de5fa49ab97976a3a852e5408",
"SupportedTargetPlatforms": [
"Win64",
"Android",
"IOS"
],
"BlacklistPlatforms": [
"Linux"
]
}
]
}