docs(scripting): add baseline api reference and guide
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user