diff --git a/Source/ThirdParty/CMake/CMakeTarget.Build.cs b/Source/ThirdParty/CMake/CMakeTarget.Build.cs index ab018bd..8009790 100644 --- a/Source/ThirdParty/CMake/CMakeTarget.Build.cs +++ b/Source/ThirdParty/CMake/CMakeTarget.Build.cs @@ -387,31 +387,49 @@ private string GetWindowsGeneratorName(WindowsCompiler compiler) return generatorName; } - + +#if UE_5_2_OR_LATER private string GetWindowsGeneratorOptions(WindowsCompiler compiler, UnrealArch architecture) { string generatorOptions = ""; + if ((compiler == WindowsCompiler.VisualStudio2022) || (compiler == WindowsCompiler.VisualStudio2019) + ) + { + if (architecture == UnrealArch.X64) + generatorOptions = "-A x64"; + else if (architecture == UnrealArch.Arm64) + generatorOptions = "-A ARM64"; + } + + return generatorOptions; + } +#else + private string GetWindowsGeneratorOptions(WindowsCompiler compiler, WindowsArchitecture architecture) + { + string generatorOptions = ""; + if ((compiler == WindowsCompiler.VisualStudio2022) || (compiler == WindowsCompiler.VisualStudio2019) #if !UE_5_0_OR_LATER || (compiler == WindowsCompiler.VisualStudio2017) #endif //!UE_5_0_OR_LATER ) { - if (architecture == UnrealArch.X64) + if (architecture == WindowsArchitecture.x64) generatorOptions = "-A x64"; - else if (architecture == UnrealArch.Arm64) + else if (architecture == WindowsArchitecture.ARM64) generatorOptions = "-A ARM64"; #if !UE_5_0_OR_LATER - else if(architecture == UnrealArch.x86) + else if(architecture == WindowsArchitecture.x86) generatorOptions = "-A Win32"; - else if(architecture == UnrealArch.Arm32) + else if(architecture == WindowsArchitecture.ARM32) generatorOptions = "-A ARM"; #endif //!UE_5_0_OR_LATER } return generatorOptions; } +#endif // UE_5_2_OR_LATER GeneratorInfo GetGeneratorInfo(ReadOnlyTargetRules target, ModuleRules rules) { diff --git a/Source/ZenoEditor/Private/Importer/Wavefront/ZenoObjLoader.cpp b/Source/ZenoEditor/Private/Importer/Wavefront/ZenoObjLoader.cpp index e7e1f6a..81238a0 100644 --- a/Source/ZenoEditor/Private/Importer/Wavefront/ZenoObjLoader.cpp +++ b/Source/ZenoEditor/Private/Importer/Wavefront/ZenoObjLoader.cpp @@ -114,7 +114,7 @@ TSharedPtr FWavefrontFileParser::Parse(EWavefrontParseError& OutError) RawMesh->FaceMaterialIndices.SetNumZeroed(EdgeNum / 3); RawMesh->FaceSmoothingMasks.SetNumZeroed(EdgeNum / 3); - return RawMesh.ToSharedPtr(); + return RawMesh; } EWavefrontAttrType FWavefrontFileParser::GetLabelFromLine(const FString& InLine, FString& OutLineData)