Download

Having issues with FObjectFinder preventing my project from opening

Kia Ora all. Currently experiencing a very annoying issue that is likely a result of my own inexperience with Unreal. For a group project I am constructing what is basically a Slay the Spire clone and I am experiencing a number of issues trying to get my Blueprints (Visual display of cards) and C++ code (Used to store the deck of cards etc) to communicate.

I have various issues but by far the most urgent is that I am currently using the following bit of card in each of the subclasses to link the blueprint for each card to the card type (So that when I spawn a card from Blueprint it spawns the correct one).

My current problem is that this code will run and work fine if I compile it whilst Unreal is open, however if I close Unreal and then open the project again it will get stuck initializing at 75%. I suspect that this is because it cannot find the Blueprints (Potentially because I am using Github for this project).

If I comment out the code and build the solution in VS then I can open the project however if anyone knows a solution to my problem that would be much appreciated.

… what do you mean link the blueprint to it? The blueprint is one of it, isn’t it?

Construction helpers cannot find unloaded Blueprint classes.

You have to create an object library and load it from path:
Asynchronous Asset Loading | Unreal Engine Documentation

Personally whenever I need to access a blueprint class in C++ I would do something like this in the header file, this will give you the option to select a blueprint class in class defaults section.

UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
TSubclassOf< AActor >BlueprintClass = nullptr;