41 lines
1.0 KiB
C++
41 lines
1.0 KiB
C++
// 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"
|
|
UENUM()
|
|
enum class ETestCrashType : uint8
|
|
{
|
|
NullPointer UMETA(DisplayName = "NullPointer"),
|
|
ArrayOutOfBounds UMETA(DisplayName = "ArrayOutOfBounds"),
|
|
BadFunctionPtr UMETA(DisplayName = "BadFunctionPtr"),
|
|
IllegalAccess UMETA(DisplayName = "IllegalAccess"),
|
|
StackOverflow UMETA(DisplayName = "StackOverflow"),
|
|
CrashOOM UMETA(DisplayName = "CrashOOM"),
|
|
Assert UMETA(DisplayName = "Assert"),
|
|
Ensure UMETA(DisplayName = "Ensure")
|
|
};
|
|
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); |