跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
搜索与研究

ue-blueprint-cpp-interop

Use when exposing C++ to Blueprint or calling Blueprint from C++: UFUNCTION(BlueprintCallable), BlueprintPure, BlueprintImplementableEvent, BlueprintNativeEvent, _Implementation, UBlueprintFunctionLibrary, WorldContext, DefaultToSelf, ExpandEnumAsExecs, DeterminesOutputType, latent nodes, FPendingLatentAction, FLatentActionInfo, UBlueprintAsyncActionBase, BlueprintAssignable, UINTERFACE, Execute_, TScriptInterface, UENUM(BlueprintType), CallInEditor, FindFunction, ProcessEvent. Also use when the user mentions 'expose to Blueprint', 'custom Blueprint node', 'async Blueprint node' or 'meta specifier'. For reflection and container basics, see ue-cpp-foundations; for details customization, see ue-editor-tools.

quodsoler · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add quodsoler/unreal-engine-skills --skill ue-blueprint-cpp-interop

技能说明


name: ue-blueprint-cpp-interop description: "Use when exposing C++ to Blueprint or calling Blueprint from C++: UFUNCTION(BlueprintCallable), BlueprintPure, BlueprintImplementableEvent, BlueprintNativeEvent, Implementation, UBlueprintFunctionLibrary, WorldContext, DefaultToSelf, ExpandEnumAsExecs, DeterminesOutputType, latent nodes, FPendingLatentAction, FLatentActionInfo, UBlueprintAsyncActionBase, BlueprintAssignable, UINTERFACE, Execute, TScriptInterface, UENUM(BlueprintType), CallInEditor, FindFunction, ProcessEvent. Also use when the user mentions 'expose to Blueprint', 'custom Blueprint node', 'async Blueprint node' or 'meta specifier'. For reflection and container basics, see ue-cpp-foundations; for details customization, see ue-editor-tools." metadata: version: "2.0.0" engine: "5.8"

UE Blueprint / C++ Interop

Target engine: UE 5.8. APIs below are verified against the 5.8 headers; older forms are listed under "Deprecated — do not use".

This skill covers the boundary between native code and the Blueprint VM: which UFUNCTION/UPROPERTY specifiers and meta= keys produce which node shapes, function libraries, latent and async nodes, Blueprint-implementable interfaces, and how C++ calls back into a Blueprint graph. Everything here lives in Core, CoreUObject and Engine (PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine" });); Project Settings pages also need DeveloperSettings. The authority for every specifier is Runtime/CoreUObject/Public/UObject/ObjectMacros.h — anything not declared in its UC, UI, UF, UP, US or UM enumerations is not a specifier.

Context

Read .agents/ue-project-context.md if it exists (module names, conventions, enabled plugins, GAS/networking setup). Do not stop if it is missing.

Identify the area from the request and the codebase. Ask only when two plausible readings would produce different code.

Request is about…Go to
Making a C++ function callable or overridable in BlueprintUFUNCTION Exposure
Making data visible or editable in Blueprint, getters/settersUPROPERTY Exposure
Static helpers, WorldContext, DefaultToSelfFunction Libraries
A node with an exec pin that finishes later (Delay-style)Latent Nodes
A node with several output exec pins that fire on eventsAsync Action Nodes
Interfaces Blueprint can implement, Execute_, TScriptInterfaceBlueprint Interfaces
UENUM, USTRUCT, containers as Blueprint typesEnums and Structs in Blueprint
BlueprintAssignable events, binding Blueprint to a C++ delegateDelegates and Events
Running Blueprint logic from native code, Blueprint classesCalling Blueprint from Native Code
Subsystems, UDeveloperSettings, Exec commandsSubsystems and Settings in Blueprint
A button in the Details panel, editor-only actionsEditor-Callable Functions

UFUNCTION Exposure

SpecifierNode shapeC++ body
BlueprintCallableExec pins in and outYours
BlueprintPureNo exec pins; implies BlueprintCallableYours, side-effect free
BlueprintImplementableEventEvent the Blueprint implementsNone — UHT generates the thunk
BlueprintNativeEventEvent the Blueprint may overrideName_Implementation only
BlueprintGetter / BlueprintSetterHidden; reached through the propertyYours
BlueprintAuthorityOnlyBlueprint calls are skipped without network authority (direct C++ calls still run)Yours
BlueprintCosmeticBlueprint calls are skipped on a dedicated server (direct C++ calls still run)Yours
BlueprintInternalUseOnlyNot offered in the palette; only generated nodes call itYours
CallInEditorButton on the Details panelYours
ExecConsole commandYours

Category="A\|B" builds a nested palette category. The node-shaping meta= keys — DisplayName, ToolTip, Keywords, CompactNodeTitle, AdvancedDisplay, ReturnDisplayName, HidePin, DeterminesOutputType, DynamicOutputParam, ArrayParm, ExpandEnumAsExecs, WorldContext, UnsafeDuringActorConstruction, DevelopmentOnly, BlueprintThreadSafe and the rest — are tabled with header citations in references/blueprint-meta-specifiers.md.

// MyActor.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "MyActor.generated.h"

UCLASS(Blueprintable)
class MYGAME_API AMyActor : public AActor
{
    GENERATED_BODY()
public:
    UFUNCTION(BlueprintCallable, Category="MyGame|Combat", meta=(Keywords="damage hurt"))
    void ApplyDamage(float Amount);

    UFUNCTION(BlueprintPure, Category="MyGame|Combat", meta=(CompactNodeTitle="HP", ReturnDisplayName="Health"))
    float GetHealth() const;

    /** Blueprint supplies the whole body; C++ never defines this. */
    UFUNCTION(BlueprintImplementableEvent, Category="MyGame|Combat")
    void OnDamaged(float Amount);

    /** C++ supplies the default in OnDied_Implementation; Blueprint may override it. */
    UFUNCTION(BlueprintNativeEvent, Category="MyGame|Combat")
    void OnDied();
    virtual void OnDied_Implementation();

    UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category="MyGame|Combat")
    void ResetOnServer() { Health = MaxHealth; }     // Blueprint calls skipped on clients

    UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category="MyGame|FX")
    void PlayHitFlash() {}                           // Blueprint calls skipped on a dedicated server

    UFUNCTION(CallInEditor, Category="MyGame|Tools")
    void SnapToGround() {}
阅读完整来源 ↗