Hello people.
I’m studying C ++ in the Unreal Engine 4 environment, I encountered a problem of this kind - I show in the screenshot 1.jpg - Google Drive
UCLASS()
class LEARNUE4_API ANPC : public ACharacter
{
GENERATED_UCLASS_BODY()
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Collision)
TSubobjectPtr<class USphereComponent> ProxSphere;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = NPCMessage)
FString NpcMessage;
}
Here in this place is a mistake. And interestingly, in TSubobjectPtrDeprecated if write TSubobjectPtr, that to me writes that it already out of date and need write TSubobjectPtrDeprecated
Problem solved:
GENERATED_BODY()
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Collision, meta = (AllowPrivateAccess = "true"))
USphereComponent* ProxShape;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = NPCMessage, meta = (AllowPrivateAccess = "true"))
FString NpcMessage;