Say you need a dumb data container for usage in either Blueprints or C++.

Does your container need functions? Use a UCLASS UOBJECT, otherwise, use USTRUCT.

UCLASS:

  1. From the editor, create a new C++ class, Show All, choose UObject
  2. Set the following specificers for UCLASS and UPROPERTY in the header file:
UCLASS(BlueprintType)
class x_API UMyObject: public UObject
{
	GENERATED_BODY()
	
public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	MyProperty* Property;	

	UFUNCTION(BlueprintCallable)
	void MyFunction();

USTRUCT:

  1. Create an Empty C++ class from the editor
  2. Edit the header file:
USTRUCT(BlueprintType)
struct FMyStruct
{
	GENERATED_STRUCT_BODY()
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	MyProperty* Property;