C++ Data Type Snippets
This page contains several code snippets for quickly creating C++ data types that can be used with Blueprints. Use this as reference or as a copy + paste resource as needed.
- You need to define two classes:
I<Name>. The second class is what your C++ code will extend to implement the interface.
class MYPROJECT_API UExample : public UInterface
class MYPROJECT_API IExample
- To access your struct from Blueprint, make sure to add the
BlueprintTypekeyword to the
- Structs must have a default constructor.
- It's Unreal coding standard to prefix your structs with a capital
- You cannot use the
UFUNCTIONmacro with methods on structs.
struct MYPROJECT_API FExample