Project Loading Hangs with FObjectFinder
Apologies if this has been asked before, but most of the questions I found about FObjectFinder were using it outside a class constructor.
I have a C++ class with a Blueprint class asset extended from it. I call FObjectFinder to get the Blueprint class from the C++ class constructor. My project compiles & runs, everything appears fine. However, when I close the project and try to reopen it, the Editor gets stuck at 70%. There's nothing wrong in the log file, it just hangs and I have to kill it from Task Manager. If I comment out FObjectFinder and recompile my code in Visual Studio, the project will load correctly so it's definitely those lines. I've found one post about this on the Unreal forums, but the only suggested fix was to do this edit every time you load the project. Is there anything else I can try?
Some example code, both approaches result in the same error. In both cases, MyClassBlueprint is declared as a
asked Jul 16 '16 at 01:16 PM in C++ Programming
If I understand correctly, your blueprint is a child of the class where you're using FObjectFinder? Assuming this is the case, it appears you are running into a circular reference when the the blueprint's constructor attempts to get a reference to the blueprint itself. The blueprint itself already has the functionality from the class it's based on, so getting a specific reference to it should not be necessary. Depending on what you are trying to do with the blueprint reference you should be able to add a function to the class that the blueprint can call when necessary.
answered Jul 18 '16 at 03:24 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here