CARLA
ActorSpawnResult.cpp
Go to the documentation of this file.
1 // Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2 // de Barcelona (UAB).
3 //
4 // This work is licensed under the terms of the MIT license.
5 // For a copy, see <https://opensource.org/licenses/MIT>.
6 
7 #include "Carla.h"
9 
11 {
12  static_assert(
13  static_cast<uint8>(EActorSpawnResultStatus::SIZE) == 4u,
14  "If you add a new status, please update this function.");
15 
16  switch (InStatus)
17  {
18  case EActorSpawnResultStatus::Success:
19  return TEXT("Success");
20  case EActorSpawnResultStatus::InvalidDescription:
21  return TEXT("Spawn failed because of invalid actor description");
22  case EActorSpawnResultStatus::Collision:
23  return TEXT("Spawn failed because of collision at spawn position");
24  case EActorSpawnResultStatus::UnknownError:
25  default:
26  return TEXT("Unknown error while trying to spawn actor");
27  }
28 }
static FString StatusToString(EActorSpawnResultStatus Status)
static const FString SIZE
EActorSpawnResultStatus
List of valid types for actor attributes.