Cannot construct object of type

Sorry if this is hard to understand, but english is not my first language and I’m half asleep already, so thank you in advance.

I have a class reference variable that was made using tsubclassof, but in blueprint, I can’t get it to construct an object of the type. I’ve already added BlueprintType in the UClass() argument, but it didn’t help. All of the google search results didn’t really help. What should I do?

What does CPPWorldItem inherit from ?

cppworldItem inherits from a class named “world item(which I World Item in the screenshot is)”, which inherits from Actor.

You can’t construct actor types, you can use SpawnActorFromClass for actor types. Construct object can only take object types.

1 Like

I’ve tried that, but the Spawn Actor from class node doesn’t show up in the bp editor. even when i try to copy paste it from another bp, it says ‘one or more copied nodes could not be pasted in this graph’!
Instead I can find a ‘Spawn Actor for gameplay task’ node, but it gives me a ton of other errors and I don’t think this is what I’m looking for.

Having the same issue with an actor component. Not having the same problem with other Actor Components that are nearly identical. Both started as objects, both were converted to Actor Components to allow access to Function Libraries. Now one constructs fine, the other doesn’t.

choose the “public private” when create the Class will work!