Navigation
API > API/Editor > API/Editor/GameplayTasksEditor > API/Editor/GameplayTasksEditor/UK2Node_LatentGameplayTaskCall
- UK2Node::ExpandNode()
- UK2Node_BaseAsyncTask::ExpandNode()
- UK2Node_LatentGameplayTaskCall::ExpandNode()
References
| Module | GameplayTasksEditor |
| Header | /Engine/Source/Editor/GameplayTasksEditor/Classes/K2Node_LatentGameplayTaskCall.h |
| Include | #include "K2Node_LatentGameplayTaskCall.h" |
| Source | /Engine/Source/Editor/GameplayTasksEditor/Private/K2Node_LatentGameplayTaskCall.cpp |
virtual void ExpandNode
&40;
class FKismetCompilerContext & CompilerContext,
UEdGraph &42; SourceGraph
&41;
Remarks
This is essentially a mix of K2Node_BaseAsyncTask::ExpandNode and K2Node_SpawnActorFromClass::ExpandNode. Several things are going on here: -Factory call to create proxy object (K2Node_BaseAsyncTask) -Task return delegates are created and hooked up (K2Node_BaseAsyncTask) -A BeginSpawn function is called on proxyu object (similiar to K2Node_SpawnActorFromClass) -BeginSpawn can choose to spawn or not spawn an actor (and return it) -If spawned: -SetVars are run on the newly spawned object (set expose on spawn variables - K2Node_SpawnActorFromClass) -FinishSpawn is called on the proxy object
Also, a K2Node_SpawnActorFromClass could not be used directly here, since we want the proxy object to implement its own BeginSpawn/FinishSpawn function (custom game logic will often be performed in the native implementation). K2Node_SpawnActorFromClass also requires a SpawnTransform be wired into it, and in most ability task cases, the spawn transform is implied or not necessary.