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"

Can I have several uaccet table whose struct is same?

For example, I have a struct like this :

 struct FMonsterData : public FTableRowBase {
   UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Data")
   int MonsterType;
   UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Data")
   int MonsterMaxHp;

I import JSON file to 'Content Browser' -> 'Import As" (DataTable) -> MonsterData, then I can read this data table.

My question is... Can I have more than one table which 'DataTable Row Type' is same? Because several game designers work his or her Monster json file, I want to split these json files like this, 'MonsterVillege.json', 'MonsterCastle.json', 'MonsterCave.json'. When I import several json files, it's ok but, UDataTable has data from only first json file and ignore the rest files. Should I merge all json files into one big file or anything suggesstions?

Or can I make 'Data Table' have several 'Source File'?

Product Version: UE 4.16
more ▼

asked Jul 10 '17 at 05:43 AM in C++ Programming

avatar image

29 3 8 13

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

1 answer: sort voted first

In direct answer to your question, yes you can have more than one table with the same DataTable row type. Try it and see.

However taking a step back, do you need to? JSON is text; it doesn't need to be "split" to have several contributors work at the same time. If you are using a source control system, many people may edit the contents of the same file at the same time. When checking work back in the changes will be merged with one another. If separate parts of the file are edited by each person, this merge process should be completely automatic. My recommendation would be to bang 'em into one file and job done.

NB. FWIW Importing multiple JSON files works in editor 4.16.2; hilight the multiple files in explorer and drag to the contents pane.

more ▼

answered Jul 10 '17 at 08:11 AM

avatar image

531 8 12 25

avatar image rigmania Jul 11 '17 at 04:28 AM

Hi, DerPurpelHelmut. Thanks for your reply. As I said, I tried more than one table with the same DataTable row. They are added in 'Content Browser'. But, when I try read these table, only one of them is saved. Rest of tables is not added in UDataTable::RowMap. ( I use 4.16.2)

And thank for your advice about JSON merge process. Out team use Perforce and it works perfectly as expects. But in this question, please just focus about how to have multiple table.

avatar image DerPurpelHelmut Jul 11 '17 at 04:02 PM

So, when you try to read the table, only the first table has any data contained? Even though the data is shown as present in the asset in Content Browser?

Are you sure it's a problem with the saving down, if it's shown there? How are you reading the table?

avatar image rigmania Jul 13 '17 at 01:22 AM

Hmm. I think I'm wrong. I should change my question. I read table data by UDataTable::FindRow. What I wish is to make Uasset DataTable have several source file. For example, I want to make 3 Json data into 1 Data Table asset. Thanks for your help, DerPerpelHelmut.

(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