fixed level loading, nav optimization

This commit is contained in:
2023-08-22 22:13:15 +05:00
parent 42c001189d
commit 8f6e9cde87
13 changed files with 58 additions and 14 deletions
+24
View File
@@ -2321,6 +2321,22 @@
"Path": "$(EngineDir)/Plugins/Experimental/ChaosUserDataPT/Binaries/Win64/UnrealEditor.modules",
"Type": "RequiredResource"
},
{
"Path": "$(EngineDir)/Plugins/Experimental/CodeEditor/Binaries/Win64/UnrealEditor-CodeEditor.dll",
"Type": "DynamicLibrary"
},
{
"Path": "$(EngineDir)/Plugins/Experimental/CodeEditor/Binaries/Win64/UnrealEditor.modules",
"Type": "RequiredResource"
},
{
"Path": "$(EngineDir)/Plugins/Experimental/CodeView/Binaries/Win64/UnrealEditor-CodeView.dll",
"Type": "DynamicLibrary"
},
{
"Path": "$(EngineDir)/Plugins/Experimental/CodeView/Binaries/Win64/UnrealEditor.modules",
"Type": "RequiredResource"
},
{
"Path": "$(EngineDir)/Plugins/Experimental/Dataflow/Binaries/Win64/UnrealEditor-DataflowEditor.dll",
"Type": "DynamicLibrary"
@@ -22743,6 +22759,14 @@
"Path": "$(EngineDir)/Plugins/Experimental/ChaosUserDataPT/ChaosUserDataPT.uplugin",
"Type": "UFS"
},
{
"Path": "$(EngineDir)/Plugins/Experimental/CodeEditor/CodeEditor.uplugin",
"Type": "UFS"
},
{
"Path": "$(EngineDir)/Plugins/Experimental/CodeView/CodeView.uplugin",
"Type": "UFS"
},
{
"Path": "$(EngineDir)/Plugins/Experimental/Dataflow/Dataflow.uplugin",
"Type": "UFS"
Binary file not shown.
Binary file not shown.
+7 -1
View File
@@ -28,10 +28,11 @@ r.RayTracing.UseTextureLod=True
r.DefaultFeature.MotionBlur=False
r.TemporalAA.Upsampling=False
r.DefaultFeature.AntiAliasing=1
r.AntiAliasingMethod=4
r.AntiAliasingMethod=1
r.Lumen.HardwareRayTracing=True
r.Lumen.HardwareRayTracing.LightingMode=2
r.RayTracing.Shadows=True
r.DefaultFeature.AmbientOcclusion=False
[/Script/Engine.UserInterfaceSettings]
UIScaleCurve=(EditorCurveData=(Keys=((Time=540.000000,Value=0.250000),(Time=2160.000000,Value=1.000000)),DefaultValue=340282346638528859811704183484516925440.000000,PreInfinityExtrap=RCCE_Constant,PostInfinityExtrap=RCCE_Constant),ExternalCurve=None)
@@ -44,6 +45,11 @@ s.UseBackgroundLevelStreaming=False
[/Script/NavigationSystem.RecastNavMesh]
RuntimeGeneration=Dynamic
ObservedPathsTickInterval=1.000000
MaxSimultaneousTileGenerationJobsCount=32
TileSizeUU=1216.000000
RegionChunkSplits=4
LayerChunkSplits=4
bDoFullyAsyncNavDataGathering=True
[/Script/DLSS.DLSSSettings]
bEnableDLSSInEditorViewports=False
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+8
View File
@@ -355,6 +355,14 @@
{
"Name": "cppFuncLib",
"Enabled": true
},
{
"Name": "CodeEditor",
"Enabled": true
},
{
"Name": "CodeView",
"Enabled": true
}
],
"TargetPlatforms": [
+19 -13
View File
@@ -3,6 +3,7 @@
#include "cppGI.h"
#include "Kismet/GameplayStatics.h"
#include "Misc/paths.h"
#include "Engine/levelstreamingdynamic.h"
/*for working tarray::Contains*/
@@ -32,20 +33,28 @@ void UcppGI::cppLvlManage(UObject* WorldContextObject, Fcppcoords currentCoords,
}
cpplvlsForLoading.AddUnique(currentCoords);
for (auto& lvl : cpplevelLIst) {
for (FcppLevelStruct& lvl : cpplevelLIst) {
FString tt = lvl.path;
if (currentCoords.floor == 100);
else {
loadthis = false;
for (auto& lvl1 : cpplvlsForLoading) {
bool ceq[6];
/*cppCoordEq(lvl1,lvl,ceq[0],ceq[1],ceq[2],ceq[3],ceq[4],ceq[5],false,true)*/
if (((lvl.coords.flat == -1) || ceq[0] || ((lvl1.flat == lvl.anotherLvl) && (lvl.anotherLvl >= 0)))
&& ceq[1]
for (Fcppcoords& lvl1 : cpplvlsForLoading) {
bool ceq[7];
cppCoordsEq(lvl1, lvl.coords,true,false, ceq[0], ceq[1], ceq[2], ceq[3], ceq[4], ceq[5], ceq[6]);
if (
(
(lvl.coords.flat == -1) || ceq[0] ||
((lvl1.flat == lvl.anotherLvl) && (lvl.anotherLvl >= 0))
)
&& ceq[2]
&& ceq[3]
&& (ceq[4] || ((lvl1.flat == lvl.anotherLvl) && (lvl.anotherLvl >= 0) && (currentState == 11/*3d tour*/)) || ((lvl1.flat == lvl.anotherLvl) && (lvl.anotherLvl >= 0) && ((currentState == 9) || (currentState == 10)/*sel or view plan*/) && (lvl1.flat > lvl.coords.flat)))) loadthis = true;
&& ceq[4]
&& (ceq[5] || ((lvl1.flat == lvl.anotherLvl) && (lvl.anotherLvl >= 0) && (currentState == 11/*3d tour*/)) ||
((lvl1.flat == lvl.anotherLvl) && (lvl.anotherLvl >= 0) && ((currentState == 9) || (currentState == 10)/*sel or view plan*/) && (lvl1.flat > lvl.coords.flat))
)
) loadthis = true;
}
}
}
TArray<FString> blya;
blya.Add(FString::FromInt(lvl.coords.flat));
blya.Add(FString::FromInt(lvl.coords.zone));
@@ -53,10 +62,7 @@ void UcppGI::cppLvlManage(UObject* WorldContextObject, Fcppcoords currentCoords,
blya.Add(FString::FromInt(lvl.coords.section));
blya.Add(FString::FromInt(lvl.coords.floor));
FString instanceStr = FString::Join(blya, L"_");
FString temp2;
FString* temp3=&temp2;
lvl.path.Split(FString(L"."), nullptr, temp3);
instanceStr.Append(L"_").Append(*temp3);
instanceStr.Append(L"_").Append(FPaths::GetCleanFilename(lvl.path));
FName instanceName = FName(instanceStr);
if (loadthis) {
@@ -82,7 +88,7 @@ void UcppGI::cppLvlManage(UObject* WorldContextObject, Fcppcoords currentCoords,
}
}
cpplvlsForLoading.Empty();
return;
}