spawnactor / c++ / template question

https://docs.unrealengine.com/en-US/…tor/index.html

The docs show multiple override methods where you can pass extra params.

This works:


MyCustomClass* thing = GetWorld()->SpawnActor<MyCustomClass>(MyCustomClass::StaticClass());

This doesn’t:


MyCustomClass* thing = GetWorld()->SpawnActor<MyCustomClass>(MyCustomClass::StaticClass(), location);

What is my basic missunderstanding from the docs? I assume it’s a c++/template thing.

Would someone be able to give me an example for some of those overrides just to help clear my head on this?

Cheers!

What exactly is the confusion? The overload you’re trying to use does not exist.

When you send the location, you need to also send the rotation

Boys, someone close this thread. And somebody else shut me down. I’m so tired. I assumed because when I wrote “location” as 2nd variable, and VS didnt say “hey, here’s the overrides…” and then told me this doesnt exist, I stopped thinking I needed to add Rotation.

Im sorry for wasting peoples time, and for completly doubting my own professional ability… (which is more worrying)