跳至内容

开始使用 Schola

安装先决条件

安装 Schola

  1. 将 Schola 作为 Unreal Engine 插件添加到项目中,可以通过下载源代码或通过 git 来完成。
终端窗口
git submodule add https://github.com/GPUOpen-LibrariesAndSDKs/Schola.git ./Plugins/Schola
  1. 请确保在从 Plugins/Schola/Resources/python 安装 schola Python 包之前更新 pip。

    终端窗口
    python -m pip install --upgrade pip
    pip install ./Plugins/Schola/Resources/python[all]
  2. 使用您选择的编辑器,例如 Visual StudioVisual Studio Code 来编译项目源文件。在项目编译完成之前,Schola 插件不会出现在编辑器中,也无法使用。

  3. 像往常一样在 Unreal Engine 中启动您的项目。您应该会在项目设置的“插件”部分看到 Schola 插件。

为 Schola 构建第三方依赖项 (可选)

Schola 已内置所有 C++ 依赖项。但是,如果您想使用不同版本的依赖项或 Unreal Engine,可以从源代码进行构建。

从源代码构建 Schola 的 gRPC

  1. 安装先决条件
  1. 通过从插件根目录运行以下命令,使用 /Resources/Build 中的脚本构建 gRPC
终端窗口
# Install Required Packages for Running the Build Script
sudo apt update
sudo apt-get -y install cmake git automake autoconf libtool-bin pkg-config build-essential
# Change this to your Unreal Engine path
UE_ROOT="~/UnrealEngine/UE_5.5"
export UE_ROOT
bash ./Resources/Build/linux_dependencies.sh

重新生成 Protobuf 和 gRPC 代码

  1. 请按照“从源代码构建 Schola”部分中的步骤,从源代码构建 gRPC,并获取最新版本的 protoc.exe。

  2. 运行以下命令以重新生成 protobuf 和 gRPC 代码。

    终端窗口
    python schola-build-proto --plugin-folder . --add-type-stubs
© . This site is unofficial and not affiliated with AMD.