i have old BP_FuncLib in my project and it have ‘spawn actor from class’ node.
but i cannot use this node anymore. i can use "spawn AI from class’ but cannot use ‘spawn actor’
AI is subclass from actor, if correct, this is bug.
Hey vanditKing,
This is currently a known issue, UE-31501, and is under investigation by our developers.
The issue is that in UK2Node_SpawnActorFromClass::IsCompatibleWithGraph(), there is a check that verifies that the blueprint’s type “ImplementsGetWorld”, which is not the case for Blueprint Function Libraries. You could workaround this by modifying the check that allows the node to be spawned. However, it is possible that you can end up with an incompatible node in this case. You would need to spawn the node in a blueprint with the ShowWorldContextPin metadata.
The current workaround is:
- Remove the “ImplementsGetWorld” check from UK2Node_SpawnActorFromClass::IsCompatibleWithGraph
- Add a Spawn Actor node to a blueprint with ShowWorldContextPin (you’ll probably have to define your own C++ base type for this)
- Copy the node and paste it into your function library.
Have a great day
thx a lot!
I can verify that the pasting trick doesn’t work. The editor spits out a “conflicting node substituted during paste!” notification and then does nothing.
This has been around for a while now and the bug base shows “unresolved”. Is there any solution in sight?
Hope they have there priorities on this one. The fix on this one would really turn my simple project to much simpler.
i’m not completely sure what
Remove the “ImplementsGetWorld” check
from
UK2Node_SpawnActorFromClass::IsCompatibleWithGraph
mean, but commenting IsCompatibleWithGraph line in UK2Node_SpawnActorFromClass (.. \UE_4.23\Engine\Source\Editor\BlueprintGraph\Classes\K2Node_SpawnActorFromClass.h
) worked.
ShowWorldContextPin seem to have no effect.
[UE 4.23.1]