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"

Table Row as reference rather than referenced by name?

Is it possible to reference a specific row from a DataTable inside an Actor or Object as a direct reference to specific row rather than by table row name?

From experience there seems to be a lot of errors by designers and other people who are creating objects where either the row name changes or is deleted and then there are issues that are not overly difficult to track and fix but its extra work that is annoying.

Our process issue aside is there a way to hard reference a row in another actor / object or is name reference the only way?

Product Version: UE 4.21
Tags:
more ▼

asked Jan 22 '19 at 01:00 PM in C++ Programming

avatar image

Mercus
113 7 8 159

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Yup.

Use this:

 #include "Classes/Engine/DataTable.h"
 
 // ItemID TO spawn
 UPROPERTY(EditAnyWhere, BlueprintReadWrite, Category = "Item Spawner")
 FDataTableRowHandle ItemToSpawn;

Then designer should select datatable first then all rows from that datatable would be in the dropdown menu ^^

PS: Changing row names would be still an issue because if row referenced somewhere else but row name changed in the datatable reference is nulled out, because of invalid row name... so must be set again

more ▼

answered Jan 22 '19 at 04:21 PM

avatar image

AmphDev
1.4k 15 9 33

avatar image Mercus Jan 23 '19 at 09:25 AM

Yep this will work for now thanks.

(comments are locked)
10|2000 characters needed characters left
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