Blueprint and C++ Help

Not sure how to ask this. I am following a book Unreal Engine 5 RPG Development great book learning a lot. The book is using UE 5 and I am using UE 5.2. Besides me having typos and adding void where it should be a bool I am doing great and learning. I am at a stand still now because I can’t load a blueprint into a custom stat that I made. In the book it works fine the author is able to load the two blueprints in to the drop downs for me nothing shows up.

Problem:
Created a Stats Category that has a drop down for Weapons Stats.
Weapon Stats then has two drop downs one for Attack Power and Defense Power.
When I click on these down downs nothing shows up.
I followed the code in the book for the Weapon Stats but my drop downs are empty. I will post the weapon stats C++ code and a picture of the empty drop downs.
Weapon Stats is an UObject that is Blueprintable
The sword is create from an item class, I am not sure if that has anything to do with it.

Any help would be greatly appreciated. If more code is needed I will provide it.

Would you mind showing the weapon stats .cpp?

Try adding the EditInlineNew specifier to the UDiceRoll class

Your Attack Power and Defense Power variables are ptrs to instances of a class UDiceRoll, therefore in editor you will never be able to assign anything there. If you want to select specific children classes of UDiceRoll to use, you need to use TSubclassOf. Maybe this will shed a bit of light Cant get EditInline to work.

Otherwise, its not quite clear what you want. Maybe share your book code?

1 Like

I apologize for the late response I am currently stationed in Japan. I got it to work somehow this morning when I woke up after reading the responses. I used Ctrl + Shift + B to build the code. Well today I closed the editor and used Ctrl + F5 to build and launch the editor and the I was able to get the blueprints in to appear in the down menu.

There is no C++ code for the weapon.cpp not even a constructor.

I am new to C++ and Unreal Engine only have been using UE and learning C++ since January 2023. I am a beginner Indy Game Dev I guess I can be called that. I really appreciate the help from the UE community.

1 Like