Some more naming and format corrections
This commit is contained in:
parent
a4d1ea431e
commit
ad6bf7369c
|
@ -24,20 +24,6 @@ FString UMapGeneratorWidget::GenerateMapFiles(const FMapGeneratorMetaInfo& MetaI
|
|||
// 1. Creating Levels
|
||||
CreateMainLargeMap(MetaInfo);
|
||||
CreateTilesMaps(MetaInfo);
|
||||
// bool bLoaded = LoadWorld(WorldAssetData);
|
||||
// GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Yellow,
|
||||
// bLoaded ? "Loaded CORRECT" : "NOT loaded");
|
||||
|
||||
// 2. Applying heightmap
|
||||
// UWorld* World = CastChecked<UWorld>(WorldAssetData.GetAsset());
|
||||
// ALandscape* landscape =
|
||||
// (ALandscape*) UGameplayStatics::GetActorOfClass(World, ALandscape::StaticClass());
|
||||
// GEngine->AddOnScreenDebugMessage(
|
||||
// -1, 15.0f, FColor::Green, landscape!=nullptr ? "L TRUE" : "L FALSE");
|
||||
// AssignLandscapeHeightMap(landscape);
|
||||
|
||||
// 3. Saving World
|
||||
// bool bSaved = SaveWorld(WorldAssetData, MetaInfo.DestinationPath, MetaInfo.MapName);
|
||||
|
||||
return ErrorMsg;
|
||||
}
|
||||
|
@ -78,8 +64,7 @@ bool UMapGeneratorWidget::LoadWorld(FAssetData& WorldAssetData, const FString& B
|
|||
bool UMapGeneratorWidget::SaveWorld(
|
||||
FAssetData& WorldToBeSaved,
|
||||
const FString& DestinationPath,
|
||||
const FString& WorldName
|
||||
)
|
||||
const FString& WorldName)
|
||||
{
|
||||
UWorld* World;
|
||||
UObjectRedirector *BaseMapRedirector =
|
||||
|
@ -108,8 +93,8 @@ bool UMapGeneratorWidget::SaveWorld(
|
|||
// Saving Package
|
||||
const FString PackageFileName = FPackageName::LongPackageNameToFilename(
|
||||
PackagePath,
|
||||
FPackageName::GetMapPackageExtension()
|
||||
);
|
||||
FPackageName::GetMapPackageExtension());
|
||||
|
||||
if(FPaths::FileExists(*PackageFileName))
|
||||
{
|
||||
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, "Package already Exists");
|
||||
|
@ -117,8 +102,7 @@ bool UMapGeneratorWidget::SaveWorld(
|
|||
}
|
||||
return UPackage::SavePackage(
|
||||
Package, World, EObjectFlags::RF_Public | EObjectFlags::RF_Standalone,
|
||||
*PackageFileName, GError, nullptr, true, true, SAVE_NoError
|
||||
);
|
||||
*PackageFileName, GError, nullptr, true, true, SAVE_NoError);
|
||||
}
|
||||
|
||||
bool UMapGeneratorWidget::CreateMainLargeMap(const FMapGeneratorMetaInfo& MetaInfo)
|
||||
|
@ -155,8 +139,7 @@ bool UMapGeneratorWidget::CreateTilesMaps(const FMapGeneratorMetaInfo& MetaInfo)
|
|||
|
||||
bool UMapGeneratorWidget::ApplyHeightMapToLandscape(
|
||||
FAssetData& WorldAssetData,
|
||||
FMapGeneratorTileMetaInfo TileMetaInfo
|
||||
)
|
||||
FMapGeneratorTileMetaInfo TileMetaInfo)
|
||||
{
|
||||
UWorld* World;
|
||||
UObjectRedirector* BaseMapRedirector =
|
||||
|
@ -171,8 +154,7 @@ bool UMapGeneratorWidget::ApplyHeightMapToLandscape(
|
|||
}
|
||||
ALandscape* landscape = (ALandscape*) UGameplayStatics::GetActorOfClass(
|
||||
World,
|
||||
ALandscape::StaticClass()
|
||||
);
|
||||
ALandscape::StaticClass());
|
||||
AssignLandscapeHeightMap(landscape, TileMetaInfo);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -184,8 +184,7 @@ FString UProceduralWaterManager::LakeGeneration(const FProceduralRiversMetaInfo
|
|||
FVector Location(
|
||||
MetaInfo.CustomScaleFactor*CenterX,
|
||||
MetaInfo.CustomScaleFactor*CenterY,
|
||||
CenterZ
|
||||
);
|
||||
CenterZ);
|
||||
|
||||
Location += MetaInfo.CustomLocationOffset;
|
||||
|
||||
|
@ -194,8 +193,7 @@ FString UProceduralWaterManager::LakeGeneration(const FProceduralRiversMetaInfo
|
|||
FVector Scale(
|
||||
MetaInfo.CustomRiverWidth * SizeX,
|
||||
MetaInfo.CustomRiverWidth * SizeY,
|
||||
1.0f
|
||||
);
|
||||
1.0f);
|
||||
|
||||
LakeActor->SetActorScale3D(Scale);
|
||||
LakeActor->SetActorLocationAndRotation(
|
||||
|
@ -203,8 +201,7 @@ FString UProceduralWaterManager::LakeGeneration(const FProceduralRiversMetaInfo
|
|||
Rotation,
|
||||
false,
|
||||
0,
|
||||
ETeleportType::None
|
||||
);
|
||||
ETeleportType::None);
|
||||
|
||||
}
|
||||
|
||||
|
@ -229,8 +226,7 @@ AActor* UProceduralWaterManager::SpawnRiverBlueprintActor()
|
|||
RiverBlueprintClass,
|
||||
Location,
|
||||
Rotation,
|
||||
SpawnInfo
|
||||
);
|
||||
SpawnInfo);
|
||||
|
||||
return RiverActor;
|
||||
}
|
||||
|
@ -247,8 +243,7 @@ AActor* UProceduralWaterManager::SpawnLakeBlueprintActor()
|
|||
LakeBlueprintClass,
|
||||
Location,
|
||||
Rotation,
|
||||
SpawnInfo
|
||||
);
|
||||
SpawnInfo);
|
||||
|
||||
return LakeActor;
|
||||
}
|
||||
|
@ -269,8 +264,7 @@ float UProceduralWaterManager::GetLandscapeSurfaceHeight(float x, float y, bool
|
|||
RayStartingPoint,
|
||||
RayEndPoint,
|
||||
FCollisionObjectQueryParams(ECollisionChannel::ECC_WorldStatic),
|
||||
FCollisionQueryParams()
|
||||
);
|
||||
FCollisionQueryParams());
|
||||
|
||||
// Draw debug line.
|
||||
if (bDrawDebugLines)
|
||||
|
@ -288,8 +282,7 @@ float UProceduralWaterManager::GetLandscapeSurfaceHeight(float x, float y, bool
|
|||
true,
|
||||
5.f,
|
||||
0.f,
|
||||
10.f
|
||||
);
|
||||
10.f);
|
||||
}
|
||||
|
||||
// Return Z Location.
|
||||
|
|
Loading…
Reference in New Issue