x

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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

[Closed] USaveGame Support

Hi, I'm implementing the saving system for our games using USaveGame, would
UPROPERTY
TArray TArray (two-dimensional array)
UPROPERTY
TMap
be supported in future version?

Product Version: Not Selected
Tags:
more ▼

asked Jun 01 '15 at 04:51 PM in C++ Programming

avatar image

Answers.Archive STAFF
1.9k 201 311 682

avatar image Answers.Archive STAFF Jun 01 '15 at 04:51 PM

Hi,

We think this post contains useful information which we would like to share with our public UE4 community. With your approval, we would like to make a copy of this post on the public AnswerHub which includes the discussion but strips out your username and company name. Please let us know if you are okay with this.

Thanks!

avatar image Answers.Archive STAFF Jun 01 '15 at 04:51 PM

No problem, you can do this. Hope it can help others.

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

The question has been closed Jun 01 '15 at 04:52 PM by Ben Halliday for the following reason:

The question is answered, right answer was accepted


1 answer: sort voted first

Hi,

Basic support for TMap properties were added in CL# 2519223 and should be available in UE 4.8. They haven't had a proper shakedown yet, and haven't specifically been tested with USaveGame, but as USaveGame uses standard serialisation, there should be no problems.

Containers of other containers are fundamentally unsupported by the UProperty system, so your TArray of TArray will not work. In this case, you should wrap your inner TArray in a USTRUCT like this:

 USTRUCT()
 struct MYPROJECT_API FMyInnerArray
 {
     GENERATED_BODY()

     UPROPERTY()
     TArray Array;
 };

 UCLASS()
 class MYPROJECT_API UMySaveGame : public USaveGame
 {
     GENERATED_BODY()

     UPROPERTY()
     TArray ArrayOfArrays;
 }

Hope this helps,

Steve

more ▼

answered Jun 01 '15 at 04:51 PM

avatar image

Answers.Archive STAFF
1.9k 201 311 682

avatar image Answers.Archive STAFF Jun 01 '15 at 04:51 PM

Thanks a lot, this make us great help.

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

Follow this question

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

Answers to this question