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.
Last updated
Was this helpful?
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.
Last updated
Was this helpful?
For more information about interfaces in Unreal, .
You need to define two classes: U<Name>
and I<Name>
. The second class is what your C++ code will extend to implement the interface.
To access your struct from Blueprint, make sure to add the BlueprintType
keyword to the USTRUCT
macro.
Structs must have a default constructor.
It's Unreal coding standard to prefix your structs with a capital F
.
You cannot use the UFUNCTION
macro with methods on structs.
For more information about structs in Unreal, .