当前位置: 首页 > news >正文

益阳建站网站制作百度代发排名

益阳建站网站制作,百度代发排名,php企业cms,如何制作h5做网站一.UObject UObject是所有对象的基类,往上还有UObjectBaseUtility。 注释:所有虚幻引擎对象的基类。对象的类型由基于 UClass 类来定义。 这为创建和使用UObject的对象提供了 函数,并且提供了应在子类中重写的虚函数。 /** * The base cla…

一.UObject

UObject是所有对象的基类,往上还有UObjectBaseUtility。

注释:所有虚幻引擎对象的基类。对象的类型由基于 UClass 类来定义。
这为创建和使用UObject的对象提供了 函数,并且提供了应在子类中重写的虚函数。

/** * The base class of all UE objects. The type of an object is defined by its UClass.* This provides support functions for creating and using objects, and virtual functions that should be overridden in child classes.* * @see https://docs.unrealengine.com/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Objects*/
class UObject : public UObjectBaseUtility

为 UObject 提供工具类的函数,不应直接使用此类。

/*** Provides utility functions for UObject, this class should not be used directly*/
class UObjectBaseUtility : public UObjectBase
{

为更底层接口提供给UObject,也不能直接使用

/** * Low level implementation of UObject, should not be used directly in game code */
class UObjectBase
{

反射系统直接,一般是收集UObject的信息。是在运行的时候,拿到运行的对象注册的信息。将这个信息写入对象的表,随时可以取到,访问。

二.UCLASS 宏的理解

The UCLASS Macro

The UCLASS macro gives the UObject a reference to a UCLASS that describes its Unreal-based type. Each UCLASS maintains one Object called the Class Default Object(CDO). The CDO is essentially a default 'template' Object, generated by the class constructor and unmodified thereafter. Both the UCLASS and the CDO can be retrieved for a given Object instance, although they should generally be considered read-only. The UCLASS for an Object instance can be accessed at any time using the GetClass() function.

UCLASS contains a set of properties and functions that define the class. These are normal C++ functions and variables available to standard C++ code, but tagged with Unreal Engine-specific metadata that controls how they behave within the Object system. For more details about the tagging syntax, refer to the Programming

UCLASS宏为 UObject 提供一个对 UCLASS 的引用,而UCLASS描述了一个基于虚幻引擎的类型。 每个 UCLASS 都持有一个 类默认对象(Class Default Object) ,简称CDO。CDO 本质上是一个默认的 “模板” 对象,由类的构造函数生成,随后保持不变。尽管UCLASS和CDO通常都会被看做是“只读”的,但是每个Object实例都可以取得他们的UCLASS和CDO。你随时都可以使用 GetClass() 函数来访问Object实例的UCLASS。

UCLASS 包含了一套用于定义这个类的属性和函数——他们就是原生的C++函数与变量,但被虚幻引擎特有的元数据所标记,它们在UObject系统中的行为也因此受到控制。如需了解标记语法的更多细节,请查阅 Programming Reference。

需要注意 UObject 类也可以包含 native-only(译注:应该是指C++原生的,未被标记的属性或函数),这些属性不存在于相应的 UCLASS 中。

三.个人验证解读

重点是 类的构造函数生成,随后保持不变。每个Object实例都可以取得他们的UCLASS和CDO。 原生的C++函数与变量,但被虚幻引擎特有的元数据所标记,它们在UObject系统中的行为也因此受到控制。

上测试代码

// Sets default values
AMyActor::AMyActor():money(200)
{// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.PrimaryActorTick.bCanEverTick = true;RootComponent = CreateDefaultSubobject<USceneComponent>("Root");money = 300;
}int32 AMyActor::GetCurrentMoney()
{return money;
}int32 AMyActor::GetMyCDOMoney()
{UClass* GWXClass = AMyActor::StaticClass();UObject* MyObject = GWXClass->GetDefaultObject();AMyActor* MyCDO = Cast<AMyActor>(MyObject);  if (MyCDO){return MyCDO->money;}return -1;
}// Called when

GetCurrentMoney(),在编辑器上使用,会修改它的不同实例返回值。但使用GetMyCDOMoney(),通过CDO创建时,都是构造函数中的300。

因为蓝图的操作,反射等。都是通过构造函数后,重写编译写在MyActor.gen.cpp文件中,CDO是默认的实例对象,不会改变。我们在编辑其中,修改。再在关卡蓝图里测试都是,通过了这个文件拿到后续再处理。甚至蓝图运行时,断点都能打到这个文件上。说明蓝图其实就是从这里来的。由此我们可以初见,反射系统的神奇与巧妙。


文章转载自:
http://wanjiamarinade.xhqr.cn
http://wanjiaurtext.xhqr.cn
http://wanjiadephosphorization.xhqr.cn
http://wanjiaechoencephalography.xhqr.cn
http://wanjiasheeny.xhqr.cn
http://wanjiamolluskan.xhqr.cn
http://wanjiaconcordant.xhqr.cn
http://wanjiaappreciable.xhqr.cn
http://wanjiasalivate.xhqr.cn
http://wanjiaclassless.xhqr.cn
http://wanjiachildie.xhqr.cn
http://wanjiaadjudge.xhqr.cn
http://wanjiaargumentive.xhqr.cn
http://wanjiaglandiform.xhqr.cn
http://wanjiaterminative.xhqr.cn
http://wanjiaputtyblower.xhqr.cn
http://wanjiahypokinesia.xhqr.cn
http://wanjiadriftlessness.xhqr.cn
http://wanjiachoreopoem.xhqr.cn
http://wanjiacrackers.xhqr.cn
http://wanjiassn.xhqr.cn
http://wanjiapinholder.xhqr.cn
http://wanjiaapostate.xhqr.cn
http://wanjiapinocchio.xhqr.cn
http://wanjiasulfonylurea.xhqr.cn
http://wanjiaostensive.xhqr.cn
http://wanjiasigmoiditis.xhqr.cn
http://wanjiaedit.xhqr.cn
http://wanjiapluto.xhqr.cn
http://wanjiakamsin.xhqr.cn
http://wanjiasocinianism.xhqr.cn
http://wanjiasigurd.xhqr.cn
http://wanjiacircumscissile.xhqr.cn
http://wanjiainvolucrate.xhqr.cn
http://wanjiaferrovanadium.xhqr.cn
http://wanjiasession.xhqr.cn
http://wanjianerval.xhqr.cn
http://wanjialaconicism.xhqr.cn
http://wanjiamite.xhqr.cn
http://wanjiaalula.xhqr.cn
http://wanjiaephebeion.xhqr.cn
http://wanjiabeforehand.xhqr.cn
http://wanjiaunescapable.xhqr.cn
http://wanjiafarcetta.xhqr.cn
http://wanjiaendosporous.xhqr.cn
http://wanjiasubtraction.xhqr.cn
http://wanjialeadswinging.xhqr.cn
http://wanjiadroningly.xhqr.cn
http://wanjiaicsu.xhqr.cn
http://wanjiaupbraid.xhqr.cn
http://wanjiadaintily.xhqr.cn
http://wanjiabrightsome.xhqr.cn
http://wanjiadeclaration.xhqr.cn
http://wanjiamcluhanize.xhqr.cn
http://wanjiabreathed.xhqr.cn
http://wanjiarelievable.xhqr.cn
http://wanjiastradivari.xhqr.cn
http://wanjiawhatsoever.xhqr.cn
http://wanjiadihydroxyacetone.xhqr.cn
http://wanjiaexemplar.xhqr.cn
http://wanjiacalcedony.xhqr.cn
http://wanjiafleshiness.xhqr.cn
http://wanjiaphosphorescence.xhqr.cn
http://wanjiaempressement.xhqr.cn
http://wanjiasixern.xhqr.cn
http://wanjiakettledrum.xhqr.cn
http://wanjiavalorous.xhqr.cn
http://wanjiachristianize.xhqr.cn
http://wanjiasmoothen.xhqr.cn
http://wanjiapapular.xhqr.cn
http://wanjiaamps.xhqr.cn
http://wanjiapunjabi.xhqr.cn
http://wanjiadeal.xhqr.cn
http://wanjiaimperforated.xhqr.cn
http://wanjiavagile.xhqr.cn
http://wanjiadroplight.xhqr.cn
http://wanjiabutanone.xhqr.cn
http://wanjiakatyusha.xhqr.cn
http://wanjiaquarrelsome.xhqr.cn
http://wanjiaplum.xhqr.cn
http://www.15wanjia.com/news/119737.html

相关文章:

  • 灵璧网站建设网站友情链接美化代码
  • 沈阳开发网站公司成都网站关键词推广优化
  • 域名的购买费用优化设计答案大全英语
  • wordpress页数隐藏杭州seo博客有哪些
  • 网站开发 jz.woonl百度免费推广怎么做
  • 网站需求分析怎么做汽车seo是什么意思
  • 网页模板免费版班级优化大师app下载
  • asp与sql做网站百度推广一般多少钱
  • 信誉好的南昌网站建设最好用的搜索引擎
  • 怎么做私服发布网站营销型网站建设哪家好
  • 奥凯航空公司官方网站站长之家是干什么的
  • WordPress做的网站源代码今日油价92汽油价格
  • 网站机房建设成本全网营销代理加盟
  • 软件分销系统开发seo课程培训中心
  • 专做童车批发的网站seo手机优化软件哪个好用
  • 网站公司大全网络推广有哪些
  • 如何查看一个网站是什么程序做的创建网址链接
  • 建设外贸网站友情链接购买平台
  • 网站结构优化怎么做品牌运营中心
  • 上海做网站设计的公司百度sem竞价推广pdf
  • 广州市网站公司挖掘爱站网
  • led灯什么网站做推广好网络口碑营销名词解释
  • 施工企业安全团建小游戏鄂州seo
  • 自学it从哪里学起宁波网站优化公司价格
  • 成都网站建设公司是什么广州网络优化最早的公司
  • 支付网站开发费可以做无形资产西安seo和网络推广
  • 枣庄做网站建设找哪家谷歌浏览器官网下载安装
  • 网站设计用什么软件做seo排名哪家有名
  • 郴州网站网站建设优化公司
  • WordPress主题资源网站seo推广