Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

TArray of TArray support request

Will TArray of TArray (two-dimensional or three-dimensional etc. arrays) be supprted in engine (with exposing to blueprint)?

I think this feature will be great

 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = test)
 TArray<TArray<int32>> array2d;

array2D[3][6] = 5;

Or there are technical limits in C++ language\reflection system?

Product Version: Not Selected
more ▼

asked May 12 '16 at 09:24 AM in C++ Programming

avatar image

584 45 65 95

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

This is reflection or VM limitation, UnrealScript in UE3 which blueprint use VM from it also had this limitation even thru syntax allowed to do so it showed you error. C++ can have native array of native array because C++... don't really have array, they just pointers and index only offset memory address of varable.

You could use native array without UPROPERTY specially since you use it for int32, note that we not speaking here about C++ standard library arrays, i'm not sure if they support array in array but you could try to use them. You would need to make some functions to make such array usable in blueprint, but you could freely in C++. If you use such array with UObject pointers remember that it won't be tracked by Engine so object will be subject of GC cleaning when they are not reference somewhere else

more ▼

answered May 12 '16 at 06:18 PM

avatar image

37.3k 936 172 1117

avatar image broly May 13 '16 at 06:03 AM

Thank you for detailed answer, Shadowriver!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi broly,

This is not something we are looking to add at this time. For one thing, there is no syntax for the specifiers of the inner array.

If you want an array within an array, you should wrap your nested array within a struct:

 struct FInnerArray

     UPROPERTY(/* Inner specifiers */)
     TArray<int32> ArrayOfInts;

 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = test)
 TArray<FInnerArray> array2d;

Hope this helps,


more ▼

answered May 12 '16 at 09:31 AM

avatar image

Steve Robb STAFF
2.8k 58 31 101

avatar image broly May 12 '16 at 09:55 AM

Hi Steve! Sorry, but inconveniently and bulky. A lot of redundant code

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question