# Inherite from UDataTable

**URL:** <https://forums.unrealengine.com/t/inherite-from-udatatable/410228>\
**Category:** Community & Industry Discussion\
**Tags:** inheritance, datatable, unreal-engine, question\
**Created:** [November 21, 2017, 3:20pm UTC](https://forums.unrealengine.com/t/inherite-from-udatatable/410228 "2017-11-21T15:20:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valerik87](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Valerik87](https://forums.unrealengine.com/u/Valerik87)\
**Post date:** [November 21, 2017, 3:20pm UTC](https://forums.unrealengine.com/t/inherite-from-udatatable/410228/1 "2017-11-21T15:20:55Z")

</div>

Hi there!

I’m new on Unreal so maybe what I’m trying to do isn’t allowed.

I’m using DataTable but actually I want a DataTable with more feature so I started to write in c++ a class extending UDataTable (class UMyDataTable : public UDataTable).

and adding a  
UProperty(…)  
FName TestName

Actually the variable is exposed in the blueprint settings panel but… I can’t see anymore the view “pick structure” (flow is defined inside UDataTableFactory).

How I can still assign a valid FTableRowBase to MyDataTable?

---

<div class="post-metadata">

**Author:** ![Koulounil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Koulounil](https://forums.unrealengine.com/u/Koulounil)\
**Post date:** [May 19, 2020, 7:33pm UTC](https://forums.unrealengine.com/t/inherite-from-udatatable/410228/2 "2020-05-19T19:33:15Z")

</div>

Hi ! It feels like I’m looking for doing more or less the same but I’m stuck earlier in the process.

Once created the class and compiled, how did you create an asset that used this class ?

For blueprint classes, it’s quite easy as one just uses the “Create Basic Asset → blueprint class”. But for other asset types, it seems like its necessary to go through a whole “Asset factory” thing like they did there : [Is it possible to add custom asset category for custom Data Asset? - C++ Programming - Unreal Engine Forums](https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1414667-is-it-possible-to-add-custom-asset-category-for-custom-data-asset)

Did you have to do it too ?

---

<div class="post-metadata">

**Author:** ![nameLive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nameLive](https://forums.unrealengine.com/u/nameLive)\
**Post date:** [May 21, 2020, 7:54pm UTC](https://forums.unrealengine.com/t/inherite-from-udatatable/410228/3 "2020-05-21T19:54:24Z")

</div>

If you want to create a Data Table (Note not an asset) with specifik variables etc. all you need is a Struct that inherits from Table Row Base, here is an example.  
So when i create a Data Table this struct will be we available to inherit the data table from, so i have the columns there.

#include “Runtime/Engine/Classes/Engine/DataTable.h”

USTRUCT(BlueprintType)  
struct FVertexPaint\_Datatable\_Struct : public FTableRowBase {

```
GENERATED_BODY()

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Vertex Paint Data Table")
	FString defaultMaterial;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Vertex Paint Data Table")
	FString channelColor;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Vertex Paint Data Table")
	FString materialAtChannel_0;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Vertex Paint Data Table")
	FString materialAtChannel_1;

```

};

---

<div class="post-metadata">

**Author:** ![Koulounil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Koulounil](https://forums.unrealengine.com/u/Koulounil)\
**Post date:** [May 21, 2020, 11:27pm UTC](https://forums.unrealengine.com/t/inherite-from-udatatable/410228/4 "2020-05-21T23:27:13Z")

</div>

Thanks for your contribution, it may help some people looking around data tables. But I don’t think that’s what we were discussing here.

In my case, what I would like would be to override the virtual functions of UDatatable like PostEditChangeProperty of the data table itself. I use them for configuring some blueprint assets and I would greatly like to be able to automatically update some data in my asset as soon as a row is changed.

---

<div class="post-metadata">

**Author:** ![nansP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nansP](https://forums.unrealengine.com/u/nansP)\
**Post date:** [July 30, 2020, 2:40pm UTC](https://forums.unrealengine.com/t/inherite-from-udatatable/410228/5 "2020-07-30T14:40:59Z")

</div>

Hi Koulounil,

Do you find any way to do that since?

---

<div class="post-metadata">

**Author:** ![Koulounil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Koulounil](https://forums.unrealengine.com/u/Koulounil)\
**Post date:** [July 30, 2020, 3:12pm UTC](https://forums.unrealengine.com/t/inherite-from-udatatable/410228/6 "2020-07-30T15:12:48Z")

</div>

Actually, I’ve put it aside for the moment. As far as I understand it, it needs to create an editor plug-in, and I’ve not started doing that yet, as it will need me to learn a bunch of new skills.

When I’ll get back to this, I think I’ll create this editor plug-in and use the link I posted before :  
[https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1414667-is-it-possible-to-add-custom-asset-category-for-custom-data-asset](https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1414667-is-it-possible-to-add-custom-asset-category-for-custom-data-asset)

I’ll also do several other things inspired by this video : [C++ Extending the Editor | Live Training | Unreal Engine - YouTube](https://www.youtube.com/watch?v=zg_VstBxDi8)

---

<div class="post-metadata">

**Author:** ![nansP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nansP](https://forums.unrealengine.com/u/nansP)\
**Post date:** [July 31, 2020, 10:43am UTC](https://forums.unrealengine.com/t/inherite-from-udatatable/410228/7 "2020-07-31T10:43:45Z")

</div>

Thank you for your Quick response!

My goal was to categorized **UDataTables** (to use as a property of a blueprint with a TSubclassOf) and be notified when a row\>column of the datatable is updated, Using an array of  
**UDataAsset** do the tricks for me now, but i’ll be really interested when you achieve this editor plugin.

I’ll subscribe to the forum’s link to be notified,  
Thanks again !

---

<div class="post-metadata">

**Author:** ![MarvinECL](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/marvinecl/32/680524_2.png) [@MarvinECL](https://forums.unrealengine.com/u/MarvinECL)\
**Post date:** [July 1, 2023, 3:22am UTC](https://forums.unrealengine.com/t/inherite-from-udatatable/410228/8 "2023-07-01T03:22:33Z")

</div>

For developers who came here:

Basically this page is talk about to **add custom game logic to an UDataTable Object**.

You can understand this demand by an UDataAsset with an TMap in it:

```auto
UCLASS(BlueprintType)
class UCustomDataTable : public UDataAsset
{
	GENERATED_BODY()

public:

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TMap<FName, FTableRow> MapData;

..............

	UFUNCTION(BlueprintCallable)
	void CustomFunction();

..............
};

```

1. UDataAsset can have custom game function, but don’t have an Row-Column view in UE Editor
2. UDatatable can have an Row-Column view, but developer would face problem when they try to inherite from UDataTable, like Valerik87 did.

I haven’t try the inherite process, but since someone tried it for me, I think it would be better to use an functionlibrary to work with UDataTable.
