From 0906bd805ff8ce3e3b03bb44ed1312dbbc5be47e Mon Sep 17 00:00:00 2001 From: BlueRose <378100977@qq.com> Date: Tue, 4 Jul 2023 13:04:13 +0800 Subject: [PATCH] vault backup: 2023-07-04 13:04:13 --- 07-Other/MAC/安装Mac UE开发环境.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/07-Other/MAC/安装Mac UE开发环境.md b/07-Other/MAC/安装Mac UE开发环境.md index cd19279..4704bcf 100644 --- a/07-Other/MAC/安装Mac UE开发环境.md +++ b/07-Other/MAC/安装Mac UE开发环境.md @@ -54,4 +54,28 @@ https://github.com/trulyspinach/SMCAMDProcessor/releases/tag/0.7.1 >sysctl machdep.cpu 找到 `machdep.cpu.core_count` 字段,其中的数值就是 Mac 的核心数。然后可以给 xcode 开启多线程,数量数为核心数 *2,如我的是 8 核,就可以开启 16 线程: -> defaults write com.apple.Xcode PBXNumberOfParallelBuildSubtasks 16 \ No newline at end of file +> defaults write com.apple.Xcode PBXNumberOfParallelBuildSubtasks 16 + +# 编译流程 +- 先编译ShaderCompileWork +- 后编译UE5 + +macOS 13.4 Xcode 14.3编译UE5.1会报错, +```c++ +using UnrealBuildTool; +using System.Collections.Generic; + +public class YourGameTarget : TargetRules +{ + public YourGameTarget(TargetInfo Target) : base(Target) + { + if(Target.Platform == UnrealTargetPlatform.Mac) + { + bOverrideBuildEnvironment = true; + AdditionalCompilerArguments = "-Wno-deprecated-pragma"; // you can add more separated with spaces here + } + + ... + } +} +``` \ No newline at end of file