I want to add the pointer of PlayerController
Class that inherits UInterface
Class into TArray<UInterfaceClass*>
. But here is the error Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000000002f8
.
Here is my source below.
// This class does not need to be modified.
UINTERFACE(MinimalAPI)
class UMatchMakingTicket : public UInterface
{
GENERATED_BODY()
};
class RM_API IMatchMakingTicket
{
GENERATED_BODY()
// Add interface functions to this class. This is the class that will be inherited to implement this interface.
public:
virtual FString GetTicketId() = 0;
virtual int GetPoint() = 0;
virtual void OnMatched(FName SessionName) = 0;
};
class RM_API APenaltyShootOutPlayerController : public APlayerController, public IMatchMakingTicket
{
...
/*
* IMatchMakingTicket
*/
virtual FString GetTicketId() override;
virtual int GetPoint() override;
virtual void OnMatched(FName SessionName) override;
...
}
TArray<IMatchMakingTicket*> Tickets;
APenaltyShootOutPlayerController* playerController = ...
Tickets.Add(playerController); // <- EXCEPTION_ACCESS_VIOLATION
How can i solve the error?