856 B
856 B
MonoScriptRuntime::CreateManagedComponentWrapper
命名空间: XCEngine::Scripting
类型: method
头文件: XCEngine/Scripting/Mono/MonoScriptRuntime.h
签名
MonoObject* CreateManagedComponentWrapper(
MonoClass* componentClass,
uint64_t gameObjectUUID);
当前实现行为
- 只有在运行时已初始化、
componentClass非空且gameObjectUUID非零时才继续。 - 查找目标托管包装类型的单参构造函数。
- 创建托管对象。
- 以
gameObjectUUID作为构造参数调用该对象构造函数。 - 如果托管构造抛异常,会记录异常并返回
nullptr。
用途
当前主要服务于 internal call,例如从托管脚本中获取 Transform、Camera、Light 等原生组件包装对象。