# 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.

- Skill: `ecnu-icalk/convert-c-classes-to-unreal-engine-ustructs` (Agent Skill)
- Install (CLI): `npx skillmds@latest add ecnu-icalk/convert-c-classes-to-unreal-engine-ustructs`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ecnu-icalk/convert-c-classes-to-unreal-engine-ustructs/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: ECNU-ICALK (https://skillmd.com/u/ecnu-icalk)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/ecnu-icalk/convert-c-classes-to-unreal-engine-ustructs

---


# 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
1. **Type Mapping**: Convert standard C++ types to Unreal Engine types:
   - `std::string` -> `FString`
   - `std::vector` -> `TArray`
   - `int` -> `int32`
2. **Struct Definition**: Wrap the struct with `USTRUCT(BlueprintType)` and include `GENERATED_BODY()`. Ensure the struct is marked with the appropriate API macro (e.g., `PROJECTNAME_API`).
3. **Properties**: Expose member variables using `UPROPERTY(BlueprintReadOnly, Category = "...")`. Use appropriate categories based on the context (e.g., "ReadyGamesNetwork | Core").
4. **Constructors**: Update constructors to accept Unreal types (e.g., `const FString&` instead of `std::string`). Ensure default constructors are present if needed.
5. **Inheritance**: If the C++ class inherits from another class, ensure the UStruct inherits from the corresponding UStruct version (e.g., `FRGNResponse`).
6. **Getters**: Convert getter methods to return Unreal types (e.g., `const FString&`).

# Anti-Patterns
- Do not leave `std::` types in the UStruct.
- Do not omit `UPROPERTY` macros for exposed members.
- Do not forget to include necessary headers like `CoreMinimal.h`.

# Interaction Workflow
1. Receive the C++ class code.
2. Analyze the members, constructors, and inheritance.
3. 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

