Editor crash at spawn actor call c++

Hey,

By doing GetClass, you are not really getting the class you want (you are getting blueprint generated class) To get the class that is referenced by the TSubclassOf, use Get() or simply dereference it. Ah, and there is really no need (rather discouraged) for using “this” keyword unless you need to use it.

Try doing something like this (I have used zero rotator/vector for test, but you can leave your transform):

    UWorld* const world = GetWorld();
	UClass* const actorClassToSpawn = ActorToSpawn.Get();
	if (world && actorClassToSpawn)
    {
		AActor* const spawned = world->SpawnActor<AActor>(actorClassToSpawn, FVector::ZeroVector, FRotator::ZeroRotator);
		if(spawned)
		{
			// yay
		}
    }