Unreal class as input parameter in DataAssets

Hello all,

I am trying to convert my blueprint DataAsset into C++. It has a function called DetermineShape and it accepts PaperTileMapComponent as input parameter. I am trying to create it in my C++ but I am having a hard time finding the right way to do it.

Blueprint:

C++:

.h file:

.cpp file:

Compiler error:

Sorry if this is a noob question. I am still very very new to C++ so please, any help is appreciated. Thanks!

Found it!

Anyone who might stumble on this. You need to add “Paper2D” in your Source/PROJECT_NAME/PROJECT_NAME.Build.cs. You need to add it to “PublicDependencyModuleNames.AddRange”'s array. After that, in your main directory, delete everything except Source, Content, Config and .uproject file. Then right click the .uproject, and generate VS files and then double click the .uproject to rebuild the project. I am going to close this now.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.