调整目录结构

杂项:
补充导出标记
修改反射宏错误
修改变量名错误
This commit is contained in:
_Redstone_c_ 2020-12-03 22:44:18 +08:00
parent 96e9af4438
commit d1103c580b
13 changed files with 22 additions and 16 deletions

View File

@ -1,4 +1,4 @@
#include "VoxelBlock.h"
#include "Block/VoxelBlock.h"
#include "VoxelWorld.h"

View File

@ -1,4 +1,4 @@
#include "VoxelMesh.h"
#include "Block/VoxelMesh.h"
const FVoxelMeshData FVoxelMeshData::CubeTopFace =
{

View File

@ -6,6 +6,12 @@
void UVoxelBlueprintLibrary::AddBlockType(const UObject* WorldContextObject, const FName& Name, const FVoxelBlockType& BlockType)
{
UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(WorldContextObject);
UVoxelSubsystem* LockstepSubsystem = GameInstance->GetSubsystem<UVoxelSubsystem>();
LockstepSubsystem->BlockTypes.Add(Name, BlockType);
check(GameInstance);
UVoxelSubsystem* VoxelSubsystem = GameInstance->GetSubsystem<UVoxelSubsystem>();
check(VoxelSubsystem);
VoxelSubsystem->BlockTypes.Add(Name, BlockType);
}

View File

@ -1,4 +1,4 @@
#include "VoxelChunk.h"
#include "Chunk/VoxelChunk.h"
#include "VoxelLog.h"
#include "VoxelWorld.h"

View File

@ -1,6 +1,6 @@
#include "VoxelSubsystem.h"
#include "VoxelBlock.h"
#include "Block/VoxelBlock.h"
UVoxelSubsystem::UVoxelSubsystem(const class FObjectInitializer& ObjectInitializer)
{

View File

@ -1,10 +1,10 @@
#include "VoxelWorld.h"
#include "VoxelLog.h"
#include "VoxelBlock.h"
#include "VoxelChunk.h"
#include "VoxelHelper.h"
#include "VoxelSubsystem.h"
#include "Block/VoxelBlock.h"
#include "Chunk/VoxelChunk.h"
#include "VoxelAgentInterface.h"
const TArray<FIntPoint> ChunkLoadOrder =

View File

@ -4,7 +4,7 @@
#include "VoxelMesh.generated.h"
USTRUCT(BlueprintType)
struct FVoxelMeshData
struct VOXEL_API FVoxelMeshData
{
GENERATED_BODY()

View File

@ -1,14 +1,14 @@
#pragma once
#include "CoreMinimal.h"
#include "VoxelBlock.h"
#include "Block/VoxelBlock.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "VoxelBlueprintLibrary.generated.h"
struct FVoxelBlockType;
UCLASS()
class UVoxelBlueprintLibrary : public UBlueprintFunctionLibrary
class VOXEL_API UVoxelBlueprintLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()

View File

@ -1,7 +1,7 @@
#pragma once
#include "CoreMinimal.h"
#include "VoxelBlock.h"
#include "Block/VoxelBlock.h"
#include "GameFramework/Actor.h"
#include "VoxelChunk.generated.h"

View File

@ -8,7 +8,7 @@
class AVoxelWorld;
UCLASS()
class UVoxelHelper : public UBlueprintFunctionLibrary
class VOXEL_API UVoxelHelper : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
@ -17,7 +17,7 @@ public:
UFUNCTION(BlueprintCallable, Category = "Voxel|Helper", meta = (WorldContext = "WorldContextObject"))
static AVoxelWorld* CreateVoxelWorld(UObject* WorldContextObject, const FVoxelWorldSetting& WorldSetting);
UFUNCTION(BlueprintCallable, Category = "Voxel|Helper")
UFUNCTION(BlueprintPure, Category = "Voxel|Helper")
static void WorldToRelativeLocation(const FIntVector& InWorldLocation, FIntPoint& OutChunkLocation, FIntVector& OutRelativeLocation);
};

View File

@ -7,7 +7,7 @@
struct FVoxelBlockType;
UCLASS()
class UVoxelSubsystem : public UGameInstanceSubsystem
class VOXEL_API UVoxelSubsystem : public UGameInstanceSubsystem
{
GENERATED_BODY()

View File

@ -13,7 +13,7 @@ class UVoxelSubsystem;
class IVoxelAgentInterface;
USTRUCT(BlueprintType)
struct FVoxelWorldSetting
struct VOXEL_API FVoxelWorldSetting
{
GENERATED_BODY()