I am trying to create a custom class that i can then use in my blueprints. I need this class to hold player information like name and a path to their picture. What I have made so far doesn't compile or build without errors and I don't know how to fix it since I have never worked with this
header file #pragma once
#include "Object.h"
#include <iostream>
#include "PlayerClass.generated.h"
/**
*
*/
UCLASS()
class PROTOTYPE2_API UPlayerClass : public UObject
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Switch Variables");
string playerName;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Switch Variables")
string playerTeam;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Switch Variables")
string picPath;
UPlayerClass(const FObjectInitializer& ObjectInitializer);
UFUNCTION()
void importPic(string picPath);
};
.cpp file
#include "Prototype2.h"
#include "PlayerClass.h"
UPlayerClass::UPlayerClass(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
playerName = "";
playerTeam = "";
picPath = "";
}
void UPlayerClass::importPic_Implementation(Fstring picPath)
{
}