How to Get Class Defaults in C++?

Hello,

I was simply wondering, how I do something equivalent in C++ to the blueprint-function “GetClassDefaults”?
I have a variable that is a subclass of my UObject-class UPrimalItemBase, which is called “ItemClass”, that is a class-reference to the class I need access to:

	UPROPERTY(BlueprintReadWrite, Category = "Inventory")
	TSubclassOf<UPrimalItemBase> ItemClass;

I need this because I need to get some variables from my ItemClass. Here’s an image of the blueprint-function I need to convert to C++:

263380-screenshot-13.png

How could I do the same thing in C++? Thanks in advance, help is highly appreciated! :slight_smile:

Stefan

1 Like