In UE4 I know how to create a class.
I’ve made many just haven’t had to use a queue until today.
Here’s an example of what I’m making to try to get a TQueue in a test class.
#pragma once
// include files
#include "MyObject.generated.h"
// forward declare classes
class MySecondObject;
UCLASS( ClassGroup=(Custom),meta=(BlueprintSpawnableComponent) )
class MYGAME_API MyObject : public UObject
{
GENERATED_BODY()
public:
// add your constructors, ext
// my vars
};
So here’s my problem.
How come I can add a container of TArray and it compiles fine
Example:
In the includes section I add
#include "Public/Containers/Array.h"
Under the vars section
I can add something like this this
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MySpecialClass")
TArray<MySecondObject*> m_Array;
The above compiles fine.
But if I use a TQueue which is what I need,
#include "Public/Containers/Queue.h"
and variable
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MySpecialClass")
TQueue<MySecondObject*> m_Queue;
I get a compile error of
error :
Unrecognized type ‘TQueue’ - type must be a UCLASS, USTRUCT or UENUM
I’m not understanding why this is occurring.