docs(scripting): add baseline api reference and guide

This commit is contained in:
2026-03-28 15:10:54 +08:00
parent 14c7fd69ec
commit 359fe2adb3
104 changed files with 3377 additions and 27 deletions

View File

@@ -0,0 +1,30 @@
# IScriptRuntime::TrySetManagedFieldValue
**命名空间**: `XCEngine::Scripting`
**类型**: `method`
**头文件**: `XCEngine/Scripting/IScriptRuntime.h`
## 签名
```cpp
virtual bool TrySetManagedFieldValue(
const ScriptRuntimeContext& context,
const std::string& fieldName,
const ScriptFieldValue& value) = 0;
```
## 作用
向一个已经存在的托管脚本实例写入字段值。
## 契约要求
- 调用时实例未必一定存在,因此实现应自行检查。
- 如果字段不存在、类型不匹配或实例不可用,应返回 `false`
## 相关文档
- [TryGetManagedFieldValue](TryGetManagedFieldValue.md)
- [ScriptEngine::TrySetScriptFieldValue](../ScriptEngine/TrySetScriptFieldValue.md)