CARLA
Loading...
Searching...
No Matches
ActorAttacher.h
Go to the documentation of this file.
1// Copyright (c) 2026 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#pragma once
8
9#include <util/ue-header-guard-begin.h>
10#include "Kismet/BlueprintFunctionLibrary.h"
11#include <util/ue-header-guard-end.h>
12
16
17#include "ActorAttacher.generated.h"
18
19#define CARLA_ENUM_FROM_RPC(e) static_cast<uint8>(carla::rpc::AttachmentType:: e)
20
21UENUM(BlueprintType)
22enum class EAttachmentType : uint8
23{
24 Null = 0, // Workarround for UE4.24 issue with enums
25 Rigid = CARLA_ENUM_FROM_RPC(Rigid) UMETA(DisplayName = "Rigid"),
26 SpringArm = CARLA_ENUM_FROM_RPC(SpringArm) UMETA(DisplayName = "SpringArm"),
27 SpringArmGhost = CARLA_ENUM_FROM_RPC(SpringArmGhost) UMETA(DisplayName = "SpringArmGhost"),
28
29 SIZE UMETA(Hidden),
30 INVALID UMETA(Hidden)
31};
32
33static_assert(
34 static_cast<uint8>(EAttachmentType::SIZE) == static_cast<uint8>(carla::rpc::AttachmentType::SIZE),
35 "Please keep these two enums in sync.");
36
37#undef CARLA_ENUM_FROM_RPC
38
39UCLASS()
41{
42 GENERATED_BODY()
43
44public:
45
46 UFUNCTION(BlueprintCallable, Category="CARLA|Actor Attacher")
47 static void AttachActors(AActor *Child, AActor *Parent, EAttachmentType AttachmentType);
48};
EAttachmentType
static void AttachActors(AActor *Child, AActor *Parent, EAttachmentType AttachmentType)