Files
XCEngine/docs/api/components/game-object/find.md

19 lines
431 B
Markdown
Raw Normal View History

# GameObject::Find
查找指定名称的游戏对象。
```cpp
static GameObject* Find(const std::string& name);
```
**参数:**
- `name` - 要查找的游戏对象名称
**返回:** `GameObject*` - 找到的游戏对象指针,如果未找到则返回 nullptr
## 相关文档
- [GameObject 总览](game-object.md)
- [FindObjectsOfType](find-objects-of-type.md)
- [FindGameObjectsWithTag](find-game-objects-with-tag.md)