Hello everyone.
Im starting a project in unreal engine, and I want to use data assets this time. I know how to use it in blueprints, but I want to use it in c++.
I have a base character class, and I want to have a reference to a data asset (PrimaryDataAsset as CharacterDataAsset in c++)
I’ve already created the child of the CharacterDataAsset on the editor, but I can’t access it on my c++, Im using
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “Character”)
TSubclassOf CharacterDataAsset;
To expose it, so I can define it on editor, then I want to access it in my cpp, like CharacterDataAsset->…
What Im doing wrong? Its possible to access the data asset that I’ve created on blueprint as a child of a c++ primary data asset class on my c++? If not, what’s the right way to do it?
I just want to create a PrimaryDataAsset in c++, create a child in blueprint and use the data defined on editor in my c++ code.
Thanks.