gpt4 book ai didi

c# - C# 中的 .NET Unreal Tournament 机器人 - 无法构建 Codeplex 代码

转载 作者:太空宇宙 更新时间:2023-11-03 10:33:07 25 4
gpt4 key购买 nike

我想将 Unreal Tournament 环境用作使用 C# 开发 AI 机器人的 Playground 。我在这里找到了一个很好的起点 Creating NET bots for UT , 但是这个网站没有维护,有很多死链接。有关此项目的视频 UT3 Bots for .Net C# 代码的更新版本已移至 Codeplex .NET Unreal Tournament Bots .它提供了一个包含构建过程模板的文件夹和一个包含解决方案的文件夹。

我无法构建此代码。我没有使用模板的经验,在 VS2012 中加载解决方案不会构建。 VS2012迁移代码到这个版本,.NET version 2.0/3.0有警告,但是没有报错。所以我认为这不是致命的。

如果我在 VS2012 中加载解决方案,我会收到解决方案映射错误:

The mappings for the solution could not be found. [...] The active solution has been temporarily disconnected from source control because the server is unavailable. To attempt to reconnect to source control, close and then re-open the solution when the server is available. If you want to connect this solution to another server, use the Change Source Control dialog.

如果我无论如何尝试构建,我都会收到以下构建错误:

2>D:\Essential\Programming\Visual C#\Unreal tournament\UT Remote bots\UTRemoteBotSolution\UTUserBot2004\RemoteUserBot.cs(189,35,189,43): error CS0246: The type or namespace name 'UTVector' could not be found (are you missing a using directive or an assembly reference?) [...] ========== Build: 0 succeeded, 2 failed, 2 up-to-date, 0 skipped ==========

所有错误似乎都指向 UTUserBot2004,这是提供的 4 个解决方案之一。两个 (UTUSerBot, UTRemoteBot) 目标是 UT 1999 年度游戏版本,另外两个 (UTUserBot2004, UTRemoteBot2004) 针对 UT 2004。我只对原始 Channel9 帖子中描述的 1999 GOTY 版本感兴趣。

我假设提供的代码没问题,我认为问题在于我缺乏如何让这段代码工作的经验。

任何有助于构建此代码的帮助都将不胜感激。

最佳答案

您正在使用的项目使用了较旧的编译方式,在项目构建完成后,它被复制到解决方案中另一个项目的 bin 文件夹中。因此,除非您的项目位于完全相同的文件夹结构中(即 E:\Shared Files\Shares\),否则它将无法复制到正确的位置,并且不可用。此外,并非所有项目都相互引用。

要更正此问题,首先转到 UTRemoteBot 项目的属性。在 Build Events 选项卡上,删除 Post-Build Event Commands 中的所有内容。接下来,右键单击 UTUserBot2004 项目,然后选择 Add -> Reference... 在解决方案选项卡中,选中 UTRemoteBot2004 项目。

此外,该项目缺少对 System.Windows.Forms 的引用。再次,右键单击 UTRemoteBot 项目,Add -> Reference... 在 Assemblies 选项卡上的 Framework 下,选中 System.Windows.Forms

与源代码管理相关的消息不是问题,可以忽略,因为您不会对此项目进行更改以发布回 CodePlex。

关于c# - C# 中的 .NET Unreal Tournament 机器人 - 无法构建 Codeplex 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29059740/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com