Hello there
I’m trying to make a C++ directly derived from UObject and store it in a blueprint variable.
Begining of the class .h :
The problem is that when it comes to blueprints, I can have a variable, I can call methods and it compiles well, but I canno’t set any default instance here :
And when the game is running, it causes errors :
I searched a lot on the internet and this forum, but I couldn’t find anything that worked. As a disclaimer, I already tested these :
- BlueprintType and Blueprintable are in my UCLASS as you can see
- If I create a blueprint class of my C++ class, it just doesn’t appear in the default value choice
- I tried constructors with no arguments, with FObjectInitializer and without any constructor : all the same !
- I tried to construct object directly from BP with Construct Object From Class node : same error.
Moreover : I don’t want to set my UObject an AActor. My object (a neural network in this case) doesn’t have to be spawned in the world : only held into a variable field in another actor’s blueprint.
I would be really glad if you could help me with that issue Thanks !