24 lines
568 B
Markdown
24 lines
568 B
Markdown
|
|
# ScriptEngine::OnScriptComponentDestroyed
|
||
|
|
|
||
|
|
**命名空间**: `XCEngine::Scripting`
|
||
|
|
|
||
|
|
**类型**: `method`
|
||
|
|
|
||
|
|
**头文件**: `XCEngine/Scripting/ScriptEngine.h`
|
||
|
|
|
||
|
|
## 签名
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
void OnScriptComponentDestroyed(ScriptComponent* component);
|
||
|
|
```
|
||
|
|
|
||
|
|
## 当前实现行为
|
||
|
|
|
||
|
|
- 只有运行时启动且组件存在时处理。
|
||
|
|
- 找到对应状态后调用 `StopTrackingScript(..., false)`。
|
||
|
|
- 这会在需要时触发 `OnDisable`、`OnDestroy`、实例销毁,并把该组件从跟踪表移除。
|
||
|
|
|
||
|
|
## 相关文档
|
||
|
|
|
||
|
|
- [HasTrackedScriptComponent](HasTrackedScriptComponent.md)
|