当前位置:网站首页>U++学习笔记 TSubclassOf()
U++学习笔记 TSubclassOf()
2022-07-23 21:42:00 【是秃头的兔子呀】
UPROPERTY(EditAnywhere)
UClass* type;
UPROPERTY(EditAnywhere)
TSubclassOf<AActor> type1;在第二个声明中,模板类告诉编辑器的属性窗口仅列出从 AActor 派生类作为属性的选择。在第一个声明中,可以选择任何 UClass。下图说明了这一点。


除了这种 UPROPERTY 安全性之外,您还可以获得 C++ 级别的类型安全性。如果您尝试将不兼容的 TSubclassOf 类型分配给彼此,您将收到编译错误。如果您尝试分配通用 UClass,它将执行运行时检查以验证它是否可以执行分配。如果运行时检查失败,则结果值为 nullptr。
边栏推荐
- Cluster chat server: how to solve the problem of cross server communication | redis publish subscribe
- Minimum spanning tree: prim
- Use code to set activity to transparent
- [Yugong series] June 2022.Net architecture class 084- micro service topic ABP vNext micro service communication
- Openlayers instance animated GIF GIF animation
- LeetCode_ 376_ Wobble sequence
- MySQL数据库索引
- 面试快速复习(三):概率论与数理统计
- 剑指Offer第二版:字符串(简单)
- 221. Largest square ● &1277. Square submatrix with statistics all 1 ● ●
猜你喜欢

Modular development

Hezhou esp32c3 hardware configuration information serial port printout

High numbers | calculation of triple integral 2 | high numbers | handwritten notes

Unity—3D数学-Vector3

Openlayers instance advanced view positioning advanced view positioning

Summary of database stress testing methods

DBSCAN点云聚类

手机测试相关基础知识

query中的customer exit客户出口变量

How to get the worker's hat? Where is the worker's helmet?
随机推荐
Minimum spanning tree: Kruskal
uniapp使用canvas写环形进度条
flink原理及开发总结(详细)
Providers and consumers tags in zfoo
Scala programming (intermediate advanced experimental application)
Pay more attention to which securities company has the lowest commission? Is it safe to open an account online?
给定一个以数字组成的数组,实现输出id为数字,并且从小到大排序的name
Cesium core class viewer viewer details
Boost Filesystem使用手册
Unity - 3D mathematics -vector3
集群聊天服务器:集群与分布式理论
Basic principle of synchronized lock
Openlayers instance animated GIF GIF animation
Cluster chat server: creation of project directory
数据库系统概论第五版课后习题——第一章 绪论
Summary of database stress testing methods
Modular development
【arxiv】第一次上传论文小记
[attack and defense world web] difficulty four-star 12 point advanced question: confusion1
User manual of boost filesystem