54 lines
2.6 KiB
C
54 lines
2.6 KiB
C
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
//////////////////////////////////////////////////////////////
|
||
|
/// Copyright 2019 (C) Bruno Xavier B. Leite
|
||
|
//////////////////////////////////////////////////////////////
|
||
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include "Runtime/Engine/Classes/Engine/Engine.h"
|
||
|
#include "PoolSpawnOptions.generated.h"
|
||
|
|
||
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOBJP_PoolEvent);
|
||
|
|
||
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
UENUM(Category = "Object Pool", BlueprintType)
|
||
|
enum class EPoolCollisionType : uint8 {
|
||
|
NoCollision UMETA(DisplayName="No Collision"),
|
||
|
QueryOnly UMETA(DisplayName="Query Only (No Physics Collision)"),
|
||
|
PhysicsOnly UMETA(DisplayName="Physics Only (No Query Collision)"),
|
||
|
QueryAndPhysics UMETA(DisplayName="Collision Enabled (Query and Physics)"),
|
||
|
ProbeOnly UMETA(DisplayName="Probe Only (Contact Data, No Query or Physics)"),
|
||
|
QueryAndProbe UMETA(DisplayName="Query and Probe (Query and Contact Data, No Physics)"),
|
||
|
};
|
||
|
|
||
|
USTRUCT(Category = "Object Pool", BlueprintType, meta = (DisplayName = "Pool Spawn Options"))
|
||
|
struct OBJPOOL_API FPoolSpawnOptions {
|
||
|
GENERATED_BODY()
|
||
|
public:
|
||
|
UPROPERTY(Category = STRING_NONE, EditAnywhere, SaveGame, BlueprintReadWrite)
|
||
|
EPoolCollisionType CollisionType;
|
||
|
//
|
||
|
UPROPERTY(Category = STRING_NONE, EditAnywhere, SaveGame, BlueprintReadWrite)
|
||
|
bool EnableCollision;
|
||
|
//
|
||
|
UPROPERTY(Category = STRING_NONE, EditAnywhere, SaveGame, BlueprintReadWrite)
|
||
|
bool SimulatePhysics;
|
||
|
//
|
||
|
UPROPERTY(Category = STRING_NONE, EditAnywhere, SaveGame, BlueprintReadWrite)
|
||
|
bool ActorTickEnabled;
|
||
|
public:
|
||
|
FPoolSpawnOptions()
|
||
|
: CollisionType(EPoolCollisionType::QueryAndPhysics)
|
||
|
, EnableCollision(true)
|
||
|
, SimulatePhysics(true)
|
||
|
, ActorTickEnabled(true)
|
||
|
{}
|
||
|
};
|
||
|
|
||
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|