Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2015
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. template <typename VictoryObjType>
  2. static FORCEINLINE VictoryObjType* SpawnBP(
  3. UWorld* TheWorld,
  4. UClass* TheBP,
  5. const FVector& Loc,
  6. const FRotator& Rot,
  7. const bool bNoCollisionFail = true,
  8. AActor* Owner = NULL,
  9. APawn* Instigator = NULL
  10. ){
  11. if (!TheWorld) return NULL;
  12. if (!TheBP) return NULL;
  13. //~~
  14.  
  15. FActorSpawnParameters SpawnInfo;
  16. SpawnInfo.Owner = Owner;
  17. SpawnInfo.bNoCollisionFail = bNoCollisionFail;
  18. SpawnInfo.Instigator = Instigator;
  19. SpawnInfo.bDeferConstruction = false;
  20.  
  21. return TheWorld->SpawnActor<VictoryObjType>(TheBP, Loc, Rot, SpawnInfo);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement