CARLA
载入中...
搜索中...
未找到
Unreal
CarlaUE4
Plugins
Carla
Source
Carla
Actor
PropParameters.h
浏览该文件的文档.
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
#pragma once
// 指示编译器这个头文件应该只被包含一次,防止在多个文件中重复包含
8
///
9
#include "Engine/StaticMesh.h"
// 包含Unreal Engine中静态网格的类定义,用于处理3D模型
10
///
11
#include "PropParameters.generated.h"
// 包含Unreal Engine自动生成的代码,用于支持UStruct的反射和蓝图系统
12
///
13
// 定义一个枚举类EPropSize,用于表示道具的大小。这个枚举类在蓝图系统中可用。
14
UENUM(BlueprintType)
15
enum class
EPropSize
: uint8
16
{
17
// 枚举值表示道具的大小类别
18
Tiny
UMETA
(DisplayName =
"Tiny"
, ToolTip =
"Smaller than a mailbox"
),
// 极小,比邮筒还小
19
Small
UMETA
(DisplayName =
"Small"
, ToolTip =
"Size of a mailbox"
),
// 小型,邮筒大小
20
Medium
UMETA
(DisplayName =
"Medium"
, ToolTip =
"Size of a human"
),
// 中型,人类大小
21
Big
UMETA
(DisplayName =
"Big"
, ToolTip =
"Size of a bus stop"
),
// 大型,公交站大小
22
Huge
UMETA
(DisplayName =
"Huge"
, ToolTip =
"Size of a house or bigger"
),
// 巨大,房屋大小或更大
23
///
24
SIZE
UMETA
(Hidden),
// 隐藏属性,用于获取枚举项的数量,不显示在蓝图编辑器中
25
INVALID
UMETA
(DisplayName =
"INVALID"
)
// 表示无效或未设置的道具大小
26
};
27
///
28
// 定义一个结构体FPropParameters,用于存储道具的参数。这个结构体在蓝图系统中可用。
29
USTRUCT(BlueprintType)
30
struct CARLA_API
FPropParameters
31
{
32
GENERATED_BODY()
// 指示Unreal Engine为这个结构体生成必要的代码,以支持反射和蓝图系统
33
34
// 道具的名称,可以在关卡编辑器或蓝图中设置和获取
35
UPROPERTY(EditAnywhere, BlueprintReadWrite)
36
FString Name;
37
38
// 道具使用的静态网格,用于定义道具的3D模型
39
UPROPERTY(EditAnywhere, BlueprintReadWrite)
40
UStaticMesh *Mesh;
41
42
// 道具的大小,影响其在游戏中的显示和交互
43
UPROPERTY(EditAnywhere, BlueprintReadWrite)
44
EPropSize
Size =
EPropSize
::
INVALID
;
// 默认值为INVALID,表示大小尚未设置
45
};
EPropSize
EPropSize
Definition
PropParameters.h:16
EPropSize::UMETA
@ UMETA
EVehicleInputPriority::INVALID
@ INVALID
FPropParameters
Definition
PropParameters.h:31
制作者
1.10.0