Why FText can be declared without a pointer?

A quick Example:

	//Defining the name of the item
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Fashion Items Related")
		FText Name; // can be declared without a pointer

	//Defining the icon of the item
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Fashion Items Related")
		UTexture2D* Icon;//can't be declared without a pointer

I can’t declare UTexture2D Icon; is logically fine, but but declaring FText Name; is possible which is not fine logically, why?

UObjects are created through various methods, for example “NewObject” (depending on where in the code you want to create an instance). These methods set up the UObject and return a pointer.

UObject Instance Creation | Unreal Engine 4.27 Documentation

Properly using NewObject

2 Likes

Sir, Thank You for help , You just solved my problem, Thank You very much.