What's the logic behind IsInGameThread() ?

I’m interested on what the ‘best practices’ are regarding this as well. I wanted to create and destroy instanced static mesh instances on a separate thread and so ended up modifying the IsInGameThread() function so that it would accept the thread id of my thread. I had to change a bit of the ISM code but ended up getting the instance creation working, it was the removing of the instances that caused issues (something to do with physics if I remember correctly).

Spawning Actors CAN be ok on a separate thread (I had to initially disable ticking) but it will probably depend on what components etc the Actor contains. I suspect it’s probably not a good idea though unfortunately.

What i ended up having to do was implement some kind of time slicing functionality. Basically i work how much time i’m willing to allocate to spawning objects per frame (based off a minimum acceptable frame rate) and spawn while I haven’t exceeded that allocated amount. It seems to be working quite well but will depend on whether or not you NEED all objects spawned straight away as it can take a couple of seconds to spawn all objects.

EDIT: modifying IsInGameThread() probably isn’t a great idea unless you really know what you’re doing or can be sure the thread wont stuff up something else