解决打包后游戏打不开的问题
This commit is contained in:
@ -32,11 +32,11 @@ FString UBusyLevelLogicSubSystem::GetLuaFilePath_Implementation() const {
|
|||||||
|
|
||||||
void UBusyLevelLogicSubSystem::OnWorldBeginPlay(UWorld& InWorld){
|
void UBusyLevelLogicSubSystem::OnWorldBeginPlay(UWorld& InWorld){
|
||||||
Super::OnWorldBeginPlay(InWorld);
|
Super::OnWorldBeginPlay(InWorld);
|
||||||
ReceiveWorldBeginPlay();
|
// ReceiveWorldBeginPlay();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UBusyLevelLogicSubSystem::Deinitialize(){
|
void UBusyLevelLogicSubSystem::Deinitialize(){
|
||||||
Super::Deinitialize();
|
// Super::Deinitialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
TStatId UBusyLevelLogicSubSystem::GetStatId() const{
|
TStatId UBusyLevelLogicSubSystem::GetStatId() const{
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
#include "Paper2D/Classes/PaperTileMapComponent.h"
|
#include "Paper2D/Classes/PaperTileMapComponent.h"
|
||||||
#include "Paper2D/Classes/PaperTileSet.h"
|
#include "Paper2D/Classes/PaperTileSet.h"
|
||||||
#include "PaperTileMap.h"
|
#include "PaperTileMap.h"
|
||||||
|
#include "Level/Map/GameMapActor.h"
|
||||||
|
|
||||||
|
|
||||||
/* 相邻四格地形信息映射到TileSet的索引
|
/* 相邻四格地形信息映射到TileSet的索引
|
||||||
@ -16,7 +17,9 @@ const static int DefaultNeighborDataToIdxMappings[16] = {
|
|||||||
12, 13, 0, 3, 8, 1, 14, 5, 15, 4, 11, 2, 9, 10, 7, 6
|
12, 13, 0, 3, 8, 1, 14, 5, 15, 4, 11, 2, 9, 10, 7, 6
|
||||||
};
|
};
|
||||||
|
|
||||||
const static FGameplayTag SortedTerrainsWithPriority [] = {
|
static TArray<FGameplayTag> GetSortedTerrainsWithPriority()
|
||||||
|
{
|
||||||
|
static TArray<FGameplayTag> SortedTerrainsWithPriority = {
|
||||||
FGameplayTag::RequestGameplayTag("Terrain.Desert"),
|
FGameplayTag::RequestGameplayTag("Terrain.Desert"),
|
||||||
FGameplayTag::RequestGameplayTag("Terrain.Forest"),
|
FGameplayTag::RequestGameplayTag("Terrain.Forest"),
|
||||||
FGameplayTag::RequestGameplayTag("Terrain.Grassland"),
|
FGameplayTag::RequestGameplayTag("Terrain.Grassland"),
|
||||||
@ -25,7 +28,11 @@ const static FGameplayTag SortedTerrainsWithPriority [] = {
|
|||||||
FGameplayTag::RequestGameplayTag("Terrain.Land"),
|
FGameplayTag::RequestGameplayTag("Terrain.Land"),
|
||||||
FGameplayTag::RequestGameplayTag("Terrain.Water.Deep"),
|
FGameplayTag::RequestGameplayTag("Terrain.Water.Deep"),
|
||||||
FGameplayTag::RequestGameplayTag("Terrain.Water.Shallow"),
|
FGameplayTag::RequestGameplayTag("Terrain.Water.Shallow"),
|
||||||
};
|
};
|
||||||
|
return SortedTerrainsWithPriority;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -248,7 +255,7 @@ void UTerrainLayerComponent::SetupTerrainMeshes()
|
|||||||
USceneComponent *RootScene = GetOwner()->GetRootComponent();
|
USceneComponent *RootScene = GetOwner()->GetRootComponent();
|
||||||
|
|
||||||
int32 Z = 0;
|
int32 Z = 0;
|
||||||
for (const FGameplayTag &TerrainType : SortedTerrainsWithPriority)
|
for (const FGameplayTag &TerrainType : GetSortedTerrainsWithPriority())
|
||||||
{
|
{
|
||||||
if (TileSetConfigs.Find(TerrainType) == nullptr)
|
if (TileSetConfigs.Find(TerrainType) == nullptr)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user