这是用户在 2025-7-16 14:54 为 https://docs.google.com/document/u/0/d/1qnlPj6ripIK3N7RgbBZK6eh4rYw57iROOcP-ZW71xLk/mobilebasic?pli=... 保存的双语快照页面,由 沉浸式翻译 提供双语支持。了解如何保存?
Straw Hat Documentation  Straw Hat 文档

Introduction  介绍

In all my projects, logic is written on Blueprints. But blueprint classes are children of c++ classes. For example, BP_Ability is a child of ASAbility.
在我的所有项目中,逻辑都是在 Blueprint 上编写的。但蓝图类是 c++ 类的子类。例如,BP_Ability 是 ASAbility 的子级。

I created all base classes for the systems in c++ in order to use the next features:
我用 c++ 为系统创建了所有基类,以便使用下面的功能:

  • add replication functionality to UObject. UObjects are more performant than AActors, but are replicated only with c++
    向 UObject 添加复制功能。UObject 的性能比 AActor 更高,但只能使用 c++ 进行复制
  • use UPROPERTY specifiers for Details Panel customization
    使用 UPROPERTY 说明符进行细节面板自定义
  • override GetWorld() in order to use such functions like GetPlayerCharacter() in UObject
    重写 GetWorld() 以便在 UObject 中使用 GetPlayerCharacter() 等函数
  • logic can be moved to c++ for performance purposes without any changes in the project
    出于性能目的,可以将 logic 移动到 C++,而无需对项目进行任何更改
  • and others  和其他

So I have the next plugins.
所以我有下一个插件

Download the plugins for 5.2 version. Updated 8 April 2025
下载 5.2 版本的插件 。更新时间:2025 年 4 月 8 日

Download the plugins for 5.3 version. Updated 8 April 2025
下载 5.3 版本的插件 。更新时间:2025 年 4 月 8 日

Download the plugins for 5.4 version. Updated 8 April 2025
下载 5.4 版本的插件 。更新时间:2025 年 4 月 8 日

Download the plugins for 5.5 version. Updated 8 April 2025
下载 5.5 版本 。更新时间:2025 年 4 月 8 日

Download the plugins for 5.6 version. Updated 5 June 2025
下载 5.6 版本 。更新时间:2025 年 6 月 5 日

Copy all these plugins to YourProject\Plugins folder. If there is no Plugins folder in your project, create it.
将所有这些插件复制到 YourProject\Plugins 文件夹。如果您的项目中没有 Plugins 文件夹,请创建它。

E:\YourProject\Plugins.
E:\YourProject\Plugins 中。

There is a video tutorial.
有一个视频教程

After you download the plugins, you can open the project.
下载插件后,您可以打开项目。

You can add the plugins to Engine plugins folder, but in this case you won’t be able to edit them in future.
您可以将插件添加到 Engine plugins 文件夹,但在这种情况下,您将来无法编辑它们。

If you open the project without these plugins, you will see the next errors.
如果您在没有这些插件的情况下打开项目,您将看到下一个错误。

Modify Plugins  修改插件

If you need to add some parameters or functions to existing classes, you can use Blueprints or C++.
如果需要向现有类添加一些参数或函数,可以使用 Blueprints 或 C++。

Blueprints are not a suitable way, because you will need to use CastTo node to get all new added functionality.
蓝图不是一种合适的方法,因为您需要使用 CastTo 节点来获取所有新添加的功能。

For example, here I created child class PDA_ItemData from parent ISItemData.
例如,这里我ISItemData 创建了子  类 PDA_ItemData 

To get new parameter I need to cast to PDA_ItemData.
获取新  参数,我需要转换为 PDA_ItemData

Right way is to add new functionality using C++.
正确的方法是使用 C++ 添加新功能。

  1. Install Visual Studio 2022 for Unreal Engine. There are video tutorials on Youtube how to do it.
    安装适用于 Unreal Engine 的 Visual Studio 2022。Youtube 上有视频教程如何  作。
  2. Create empty C++ project.
    创建空  的 C++ 项目。

        Or you can make your existing project C++ by adding a new C++ class.
或者,您可以通过添加新的 C++ 类来使现有项目成为 C++。

  1. Download my plugins to this empty C++ project.
    将我的插件下载到这个空的 C++ 项目中。

  1. Click RMB on ProjectName.uproject and select Generate Visual Studio project files.
    单击 ProjectName.uproject 上的 RMB,然后选择 Generate Visual Studio project files

  1. Open ProjectName.sln and edit it as you want.
    打开 ProjectName.sln 并根据需要进行编辑。

  1. After you finish editing the code, compile plugins (ctrl + B).
    完成代码编辑后,编译插件 (ctrl + B)。

  1. You must receive the next messages.
    您必须收到下一条消息。

  1. Now copy Plugins folder from C++ project to your project.
    现在,将 Plugins 文件夹从 C++ 项目复制到您的项目。