Hello, I have run across a strange issue which occurs in C++ and not in Blueprints.
I am declaring a TArray in my .h file like this: TArray<CustomClass*> TestArray;
Then in my .cpp file, I try to add an element using the Array_Add function like this: UKismetArrayLibrary::Array_Add(TestArray, ClassToAdd);
However, it always throws a compile error saying it can’t convert an int32 to a pointer. When I try to do the same in Blueprints, there isn’t any problem and everything works like I would expect it to. I am quite new to Unreal so this might seem like a dumb question, but I really can’t figure out why it’s doing this Even tried using the angle brackets with the
CustomClass*
in them after the Array_Add
and the input array, but it never worked.