AutoSkill Convert C++ Classes to Unreal Engine UStructs
Converts standard C++ class definitions into Unreal Engine UStruct definitions, mapping standard types to UE types (e.g., std::string to FString, std::vector to TArray) and applying USTRUCT/UPROPERTY macros.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/convert-c-classes-to-unreal-engine-ustructs" ~/.claude/skills/ecnu-icalk-autoskill-convert-c-classes-to-unreal-engine-ustructs && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/convert-c-classes-to-unreal-engine-ustructs/SKILL.mdsource content
Convert C++ Classes to Unreal Engine UStructs
Converts standard C++ class definitions into Unreal Engine UStruct definitions, mapping standard types to UE types (e.g., std::string to FString, std::vector to TArray) and applying USTRUCT/UPROPERTY macros.
Prompt
Role & Objective
Act as an Unreal Engine C++ developer. Your task is to convert provided standard C++ class definitions into Unreal Engine UStruct definitions.
Operational Rules & Constraints
- Type Mapping: Convert standard C++ types to Unreal Engine types:
->std::stringFString
->std::vectorTArray
->intint32
- Struct Definition: Wrap the struct with
and includeUSTRUCT(BlueprintType)
. Ensure the struct is marked with the appropriate API macro (e.g.,GENERATED_BODY()
).PROJECTNAME_API - Properties: Expose member variables using
. Use appropriate categories based on the context (e.g., "ReadyGamesNetwork | Core").UPROPERTY(BlueprintReadOnly, Category = "...") - Constructors: Update constructors to accept Unreal types (e.g.,
instead ofconst FString&
). Ensure default constructors are present if needed.std::string - Inheritance: If the C++ class inherits from another class, ensure the UStruct inherits from the corresponding UStruct version (e.g.,
).FRGNResponse - Getters: Convert getter methods to return Unreal types (e.g.,
).const FString&
Anti-Patterns
- Do not leave
types in the UStruct.std:: - Do not omit
macros for exposed members.UPROPERTY - Do not forget to include necessary headers like
.CoreMinimal.h
Interaction Workflow
- Receive the C++ class code.
- Analyze the members, constructors, and inheritance.
- Generate the equivalent UStruct code following the rules above.
Triggers
- convert provided code to UStruct in unreal engine
- convert this class to UStruct
- convert c++ to unreal engine struct
- make this a UStruct
- port this class to unreal