Tabacudo
(Tabacudo)
1
Hi Guys! I’m trying to create an array of objects but I don’t know what is wrong, can you help me?
It’s an array composed of Actors. I have this class “Participant”, it’s an actor and when I create this, i got errors:
UPROPERTY(BluprintReadOnly, EditAnywhere, Category = "Points")
TArray<AParticipant> participants;
Can you guys help me?
TArray<AParticipant*> participants;
Tabacudo
(Tabacudo)
3
Still says that AParticipant identifier is not defined.
Shaggy41
(Shaggy41)
4
If you include AParticipant in cpp, then in .h file before your class add class AParticipant:
class AParticipant;
class PRO_API AMyActor : public AActor
{
GENERATED_BODY()
private:
TArray<AParticipant*> participants;
}
Or just:
TArray<class AParticipant*> participants;
Well you have to #include the .h file of course.