Hello everyone!
Just want to ask, is there a way to use Data Structure defined in Engine in C++ class?
I lost a week looking for that opportunity, but can’t find a answer.
Option to revamp all structures to C++ does not fit to me.
Hello everyone!
Just want to ask, is there a way to use Data Structure defined in Engine in C++ class?
I lost a week looking for that opportunity, but can’t find a answer.
Option to revamp all structures to C++ does not fit to me.
Not in normal C++ way, only way to get access to structure data without declering structure in C++ is via reflection system which would require get UStruct of structure and then get UProperty of all properties in it and you would need to fetch invidual value from object in via property.
You will end with more lines to fetch single variable then you would with structures declared in C++ and to avoid it… you end up declaring exact same structure in C++. in short it will feel like you downloading and uploading structure from network rether then just directly using it.Not to mention you still won’t be able to use those structures directly as arguments as well declare properties with that structure in C++.
Thats why it is a lot better to declare all structures you gonna use in C++. In fact Data Structure support in blueprint been added later on just for blueprint only projects
Looks like we must refactor all structures to C++. Sadly, but we okay with that. Thank you very much for that answer!