docs(scripting): add baseline api reference and guide
This commit is contained in:
27
docs/api/XCEngine/Scripting/ScriptComponent/Constructor.md
Normal file
27
docs/api/XCEngine/Scripting/ScriptComponent/Constructor.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# ScriptComponent::Constructor
|
||||
|
||||
**命名空间**: `XCEngine::Scripting`
|
||||
|
||||
**类型**: `constructor`
|
||||
|
||||
**头文件**: `XCEngine/Scripting/ScriptComponent.h`
|
||||
|
||||
## 签名
|
||||
|
||||
```cpp
|
||||
ScriptComponent();
|
||||
```
|
||||
|
||||
## 当前实现行为
|
||||
|
||||
- 调用内部 `GenerateScriptComponentUUID()` 生成一个非零随机 `uint64_t`。
|
||||
- `m_assemblyName` 默认初始化为 `GameScripts`。
|
||||
- 命名空间、类名和字段存储初始为空。
|
||||
|
||||
## 设计意义
|
||||
|
||||
组件 UUID 的存在,是为了让脚本运行时实例绑定不依赖对象内存地址。这样场景序列化、反序列化和运行时重建时,脚本实例可以通过 `(GameObjectUUID, ScriptComponentUUID)` 这组键稳定识别。
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [ScriptComponent](ScriptComponent.md)
|
||||
Reference in New Issue
Block a user