开始使用 Schola
安装先决条件
-
Ubuntu 22.04。 (建议使用 22.04.4 Desktop x86 64 位以保证可复现性)
-
Unreal Engine 5.5。 (建议使用 5.5.2 以保证可复现性)
-
Unreal Engine 5.5。 (建议使用 5.5.2 以保证可复现性)
安装 Schola
- 将 Schola 作为 Unreal Engine 插件添加到项目中,可以通过下载源代码或通过 git 来完成。
git submodule add https://github.com/GPUOpen-LibrariesAndSDKs/Schola.git ./Plugins/Scholagit clone https://github.com/GPUOpen-LibrariesAndSDKs/Schola.git ./Plugins-
请确保在从 Plugins/Schola/Resources/python 安装 schola Python 包之前更新 pip。
终端窗口 python -m pip install --upgrade pippip install ./Plugins/Schola/Resources/python[all] -
使用您选择的编辑器,例如 Visual Studio 或 Visual Studio Code 来编译项目源文件。在项目编译完成之前,Schola 插件不会出现在编辑器中,也无法使用。
-
像往常一样在 Unreal Engine 中启动您的项目。您应该会在项目设置的“插件”部分看到 Schola 插件。
为 Schola 构建第三方依赖项 (可选)
Schola 已内置所有 C++ 依赖项。但是,如果您想使用不同版本的依赖项或 Unreal Engine,可以从源代码进行构建。
从源代码构建 Schola 的 gRPC
- 安装先决条件
-
Ubuntu 22.04。 (建议使用 22.04.4 Desktop x86 64 位以保证可复现性)
-
Unreal Engine 5.5。 (建议使用 5.5.2 以保证可复现性)
-
Visual Studio (2017,已安装 VC++ 工具 v141,或 Visual Studio 2022,需 VC++ 工具)
-
CMake (用于从 gRPC 提供的
CMakeLists.txt生成 Visual Studio 解决方案)
- 通过从插件根目录运行以下命令,使用 /Resources/Build 中的脚本构建 gRPC
# Install Required Packages for Running the Build Scriptsudo apt updatesudo apt-get -y install cmake git automake autoconf libtool-bin pkg-config build-essential
# Change this to your Unreal Engine pathUE_ROOT="~/UnrealEngine/UE_5.5"export UE_ROOTbash ./Resources/Build/linux_dependencies.sh# Change this to your Unreal Engine path if it is different than the default.set UE_ROOT="C:\Program Files\Epic Games\UE_5.5"./Resources/Build/windows_dependencies.bat重新生成 Protobuf 和 gRPC 代码
-
请按照“从源代码构建 Schola”部分中的步骤,从源代码构建 gRPC,并获取最新版本的 protoc.exe。
-
运行以下命令以重新生成 protobuf 和 gRPC 代码。
终端窗口 python schola-build-proto --plugin-folder . --add-type-stubs