[Question] How to initialise a TArray UPROPERTY?

I’m currently creating a slate UI and have encountered the problem mentioned in this post, where after 60 seconds or so it’s as if some class properties disappear, occasionally throwing access violation errors.

However, when I attempt to implement the solution mentioned there, I get this error:

1>c:\program files\rocket\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(942): error C3861: 'StaticClass': identifier not found

The code I’m using looks like this:

.h file

UPROPERTY()
	TArray> NameArray;

.cpp

NameArray = *NewObject>>();

Is there a way I can get a TArray’s static class?

(I had a look at FClassFinder but couldn’t figure out the syntax, would it work?)

Hi,

You have made this post private, but there is not sensitive information in it. Do you mind if we make this post public?

Cheers

Thats fine, thanks. We resolved the issue

Just in case people are curious, TArray’s aren’t UObjects, so they aren’t (As far as I know) subject to the garbage collection that was causing the issue in the linked question.

Turns out it was something else, or at least, I hope it was…

Would love to know how to fix this. Can’t access the link provided. And this is an archive, and I’m probably speaking to myself :frowning:

Hello,

This is a question from the beta version of the engine. We are marking this answered for tracking purposes. If you are experiencing an issue similar to this please post a new question.

Thank you.