After working on my blueprint project for a couple weeks, I added a C++ class for a feature that would probably be simpler to make in code than in blueprints (a virtual dice roller).
At first I tried to make a C++ class based on the blueprint that would use it. My BP didn’t show up in the All Classes list so I just added it as an actor.
I added my class in as an actor and saved it to the default source folder. Two of the class’s five UFUNCTIONs are BlueprintCallable since they are the only ones that would be used in the BP. I closed out the editor when my class was done and rebuilt both the project and the engine just to be safe.
I the ran the editor from Visual Studio (with build config set to Development Editor) and tried to reparent my BP to the C++ class but the class didn’t appear in the list of availale classes. I then tried to create a Blueprint based off of the C++ class but, once again, it didn’t appear in the list.
This is my first time trying to cross C++ and Blueprints so I’m not sure how the process works.
UPDATE: I’ve got a new problem now: whenever I try to build the project or run the code, I get these errors in the header:
cannot open "ProjectName.generated.h"
- I thought this file was auto-generated?
expected an identifier
- I got this on the line containing GENERATED_BODY()
Function parameter list: Missing ']'
- That line contains the following function declaration: int32 Max(int32 list[], int32 size, int32& index);
. No idea what this means.
I wasn’t getting these errors before but I’m getting them now. I tried getting rid of the UCLASS() parameters and it still happens.