diff --git a/Source/Voxel/Private/VoxelBlock.cpp b/Source/Voxel/Private/Block/VoxelBlock.cpp similarity index 86% rename from Source/Voxel/Private/VoxelBlock.cpp rename to Source/Voxel/Private/Block/VoxelBlock.cpp index 5392735..04602e1 100644 --- a/Source/Voxel/Private/VoxelBlock.cpp +++ b/Source/Voxel/Private/Block/VoxelBlock.cpp @@ -1,4 +1,4 @@ -#include "VoxelBlock.h" +#include "Block/VoxelBlock.h" #include "VoxelWorld.h" diff --git a/Source/Voxel/Private/VoxelMesh.cpp b/Source/Voxel/Private/Block/VoxelMesh.cpp similarity index 99% rename from Source/Voxel/Private/VoxelMesh.cpp rename to Source/Voxel/Private/Block/VoxelMesh.cpp index 56d3298..3acd077 100644 --- a/Source/Voxel/Private/VoxelMesh.cpp +++ b/Source/Voxel/Private/Block/VoxelMesh.cpp @@ -1,4 +1,4 @@ -#include "VoxelMesh.h" +#include "Block/VoxelMesh.h" const FVoxelMeshData FVoxelMeshData::CubeTopFace = { diff --git a/Source/Voxel/Private/Blueprint/VoxelBlueprintLibrary.cpp b/Source/Voxel/Private/Blueprint/VoxelBlueprintLibrary.cpp index 8466a35..065248a 100644 --- a/Source/Voxel/Private/Blueprint/VoxelBlueprintLibrary.cpp +++ b/Source/Voxel/Private/Blueprint/VoxelBlueprintLibrary.cpp @@ -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(); - LockstepSubsystem->BlockTypes.Add(Name, BlockType); + + check(GameInstance); + + UVoxelSubsystem* VoxelSubsystem = GameInstance->GetSubsystem(); + + check(VoxelSubsystem); + + VoxelSubsystem->BlockTypes.Add(Name, BlockType); } diff --git a/Source/Voxel/Private/VoxelChunk.cpp b/Source/Voxel/Private/Chunk/VoxelChunk.cpp similarity index 99% rename from Source/Voxel/Private/VoxelChunk.cpp rename to Source/Voxel/Private/Chunk/VoxelChunk.cpp index 476106e..90278b5 100644 --- a/Source/Voxel/Private/VoxelChunk.cpp +++ b/Source/Voxel/Private/Chunk/VoxelChunk.cpp @@ -1,4 +1,4 @@ -#include "VoxelChunk.h" +#include "Chunk/VoxelChunk.h" #include "VoxelLog.h" #include "VoxelWorld.h" diff --git a/Source/Voxel/Private/VoxelSubsystem.cpp b/Source/Voxel/Private/VoxelSubsystem.cpp index 207c38b..261964b 100644 --- a/Source/Voxel/Private/VoxelSubsystem.cpp +++ b/Source/Voxel/Private/VoxelSubsystem.cpp @@ -1,6 +1,6 @@ #include "VoxelSubsystem.h" -#include "VoxelBlock.h" +#include "Block/VoxelBlock.h" UVoxelSubsystem::UVoxelSubsystem(const class FObjectInitializer& ObjectInitializer) { diff --git a/Source/Voxel/Private/VoxelWorld.cpp b/Source/Voxel/Private/VoxelWorld.cpp index 1545482..def01e1 100644 --- a/Source/Voxel/Private/VoxelWorld.cpp +++ b/Source/Voxel/Private/VoxelWorld.cpp @@ -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 ChunkLoadOrder = diff --git a/Source/Voxel/Public/VoxelBlock.h b/Source/Voxel/Public/Block/VoxelBlock.h similarity index 100% rename from Source/Voxel/Public/VoxelBlock.h rename to Source/Voxel/Public/Block/VoxelBlock.h diff --git a/Source/Voxel/Public/VoxelMesh.h b/Source/Voxel/Public/Block/VoxelMesh.h similarity index 97% rename from Source/Voxel/Public/VoxelMesh.h rename to Source/Voxel/Public/Block/VoxelMesh.h index 6023959..a2e42f1 100644 --- a/Source/Voxel/Public/VoxelMesh.h +++ b/Source/Voxel/Public/Block/VoxelMesh.h @@ -4,7 +4,7 @@ #include "VoxelMesh.generated.h" USTRUCT(BlueprintType) -struct FVoxelMeshData +struct VOXEL_API FVoxelMeshData { GENERATED_BODY() diff --git a/Source/Voxel/Public/Blueprint/VoxelBlueprintLibrary.h b/Source/Voxel/Public/Blueprint/VoxelBlueprintLibrary.h index 088abf1..2de5a29 100644 --- a/Source/Voxel/Public/Blueprint/VoxelBlueprintLibrary.h +++ b/Source/Voxel/Public/Blueprint/VoxelBlueprintLibrary.h @@ -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() diff --git a/Source/Voxel/Public/VoxelChunk.h b/Source/Voxel/Public/Chunk/VoxelChunk.h similarity index 98% rename from Source/Voxel/Public/VoxelChunk.h rename to Source/Voxel/Public/Chunk/VoxelChunk.h index 8b6648c..a1f46b8 100644 --- a/Source/Voxel/Public/VoxelChunk.h +++ b/Source/Voxel/Public/Chunk/VoxelChunk.h @@ -1,7 +1,7 @@ #pragma once #include "CoreMinimal.h" -#include "VoxelBlock.h" +#include "Block/VoxelBlock.h" #include "GameFramework/Actor.h" #include "VoxelChunk.generated.h" diff --git a/Source/Voxel/Public/VoxelHelper.h b/Source/Voxel/Public/VoxelHelper.h index 9c017c1..bc5703d 100644 --- a/Source/Voxel/Public/VoxelHelper.h +++ b/Source/Voxel/Public/VoxelHelper.h @@ -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); }; diff --git a/Source/Voxel/Public/VoxelSubsystem.h b/Source/Voxel/Public/VoxelSubsystem.h index b50ed9a..c512867 100644 --- a/Source/Voxel/Public/VoxelSubsystem.h +++ b/Source/Voxel/Public/VoxelSubsystem.h @@ -7,7 +7,7 @@ struct FVoxelBlockType; UCLASS() -class UVoxelSubsystem : public UGameInstanceSubsystem +class VOXEL_API UVoxelSubsystem : public UGameInstanceSubsystem { GENERATED_BODY() diff --git a/Source/Voxel/Public/VoxelWorld.h b/Source/Voxel/Public/VoxelWorld.h index 9e3773e..43ef78d 100644 --- a/Source/Voxel/Public/VoxelWorld.h +++ b/Source/Voxel/Public/VoxelWorld.h @@ -13,7 +13,7 @@ class UVoxelSubsystem; class IVoxelAgentInterface; USTRUCT(BlueprintType) -struct FVoxelWorldSetting +struct VOXEL_API FVoxelWorldSetting { GENERATED_BODY()