AirSim在M1pro电脑上编译的踩坑记录

AirSim在M1pro电脑上编译的踩坑记录

💻系统配置

系统版本:macOS Monterey. 12.6.3 (21G419)
Xcode版本:Version 14.2 (14C18)
虚幻引擎版本:UE_4.27

参考链接:https://microsoft.github.io/AirSim/build_macos/

👀 Problem1

在Xcode上编译时报错**😗*
Cannot code sign because the target does not have an Info.plist file and one is not being generated automatically. Apply an Info.plist file to the target using the INFOPLIST_FILE build setting or generate one automatically by setting the GENERATE_INFOPLIST_FILE build setting to YES (recommended).

!!! Engine和Games的都需要做以下更改哦

解决方式:
Pods -> Build Settings -> Packaging -> Generate Info.plist File = Yes

参考链接:https://stackoverflow.com/questions/73729653/xcode-14-cannot-code-sign-because-the-target-does-not-have-an-info-plist-file

在这里插入图片描述


💭 Problem2

在Xcode上编译时报错**😗*
variable ‘LayerNames’ set but not used [-Werror,-Wunused-but-set-variable]

解决方式:
对/Users/chauncy/Documents/Unreal Projects/AirSim/Unreal/Environments/Blocks/Source中的两个.cs文件都添加如下字段。
修改后的Blocks.Target.cs:

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;

public class BlocksTarget : TargetRules
{
	public BlocksTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Game;
		ExtraModuleNames.AddRange(new string[] { "Blocks" });
		bOverrideBuildEnvironment = true;
		AdditionalCompilerArguments = "-Wno-unused-but-set-variable";

		//bUseUnityBuild = false;
		if (Target.Platform == UnrealTargetPlatform.Linux)
			bUsePCHFiles = false;
	}
}

修改后的BlocksEditor.Target.cs:

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;

public class BlocksEditorTarget : TargetRules
{
	public BlocksEditorTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Editor;
		ExtraModuleNames.AddRange(new string[] { "Blocks" });
     DefaultBuildSettings = BuildSettingsVersion.V2;
     bOverrideBuildEnvironment = true;
     AdditionalCompilerArguments = "-Wno-unused-but-set-variable";
     //bUseUnityBuild = false;
     //bUsePCHFiles = false;
 }
}

I work fine for Xcode 13.3 by adding following lines to .target.cs file in my project:

bOverrideBuildEnvironment = true;
AdditionalCompilerArguments = "-Wno-unused-but-set-variable";

参考链接:https://forums.unrealengine.com/t/layernames-error-bricking-my-mac-projects/508040/8


🛫 最后

🚀 直接编译即可

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值