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