I'm trying to use a Data Table in a World Subsystem is there a way to make sure its using the Data Table asset since the subsystem doesn't have a blueprint implementation?
sorry for the late reply (youtube has has finally decided to show me this comment :( ) good question. if you are not using a blueprint derived version you could always expose the data table variable inside the subsystem to blueprints to check that the data is there. Making things blueprint accessible isn't hard and one you have determined it is working you can always take it out again or after you set it from the asset you can just use the find row and UE_LOG it to the console to make sure it is there? generally if I am doing it though I run the code from visual studio in debug mode and use breakpoints to make sure that the variable is getting set correctly
Structures made in blueprints, same as blueprints themselves exist virtually in unreal Engine reflection system and can be accessed only in runtime. This means that in C++ you would not be able to access that structure you created in blueprints, best idea would be to re-create that same structure in c++ and recreate that data table (if it is identical you could export the data first and re-import it in the new one) the only other way I could think of doing it would be to create blueprint assignable delegate functions in c++ that return a value e.g. DECLARE_DELEGATE_RetVal_OneParam and assign it in blueprint to return a value out of that struct but really I would advise just recreating that struct in c++ :)
@@saragandev Hey, I’m trying to recreate my BP structs in C++, but I’m stumped on the syntax for one property, and I was wondering if you can help me. Quick overview, I have a Struct called Item Data containing variables like Mesh, Icon, Name, Description, StackSize. I took this Struct (Item Data) and made a data table called Item Database. I then made another Struct called Item Info containing the variables Quantity (int) and ItemID (Data Table Row Handle of the Item Database data table). I have been able to recreate all of this in C++ EXCEPT the data table row handle property. So my question is, do you know to make a property of a data table row handle using a specific data table in C++?
@@Athasin sorry for the late reply, youtube has been hiding my messages and replies :( did you sort it? is it not just FString, then for the data table row FYourStruct* Item = YourDataTable->FindRow(RowName, "");
I'm trying to use a Data Table in a World Subsystem is there a way to make sure its using the Data Table asset since the subsystem doesn't have a blueprint implementation?
sorry for the late reply (youtube has has finally decided to show me this comment :( )
good question.
if you are not using a blueprint derived version you could always expose the data table variable inside the subsystem to blueprints to check that the data is there. Making things blueprint accessible isn't hard and one you have determined it is working you can always take it out again
or after you set it from the asset you can just use the find row and UE_LOG it to the console to make sure it is there?
generally if I am doing it though I run the code from visual studio in debug mode and use breakpoints to make sure that the variable is getting set correctly
Great tutorial! Just 1 question, I created my structure with blueprint, how to reference it in a c++ class? Thanks!
Structures made in blueprints, same as blueprints themselves exist virtually in unreal Engine reflection system and can be accessed only in runtime.
This means that in C++ you would not be able to access that structure you created in blueprints, best idea would be to re-create that same structure in c++ and recreate that data table (if it is identical you could export the data first and re-import it in the new one)
the only other way I could think of doing it would be to create blueprint assignable delegate functions in c++ that return a value e.g. DECLARE_DELEGATE_RetVal_OneParam and assign it in blueprint to return a value out of that struct but really I would advise just recreating that struct in c++ :)
@@saragandev Thanks a lot!
@@saragandev Hey, I’m trying to recreate my BP structs in C++, but I’m stumped on the syntax for one property, and I was wondering if you can help me.
Quick overview, I have a Struct called Item Data containing variables like Mesh, Icon, Name, Description, StackSize. I took this Struct (Item Data) and made a data table called Item Database. I then made another Struct called Item Info containing the variables Quantity (int) and ItemID (Data Table Row Handle of the Item Database data table).
I have been able to recreate all of this in C++ EXCEPT the data table row handle property. So my question is, do you know to make a property of a data table row handle using a specific data table in C++?
@@Athasin sorry for the late reply, youtube has been hiding my messages and replies :( did you sort it? is it not just FString, then for the data table row FYourStruct* Item = YourDataTable->FindRow(RowName, "");
@@saragandev Yes, I did manage to figure it out. Thanks for still replying though!