16 lines
349 B
Markdown
16 lines
349 B
Markdown
|
|
# GameObject::DetachFromParent
|
||
|
|
|
||
|
|
从父对象分离。
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
void DetachFromParent();
|
||
|
|
```
|
||
|
|
|
||
|
|
将当前 GameObject 从其父对象分离。分离后,该对象将成为根对象,但其子对象会保持为它的子对象。
|
||
|
|
|
||
|
|
## 相关文档
|
||
|
|
|
||
|
|
- [GameObject 总览](game-object.md)
|
||
|
|
- [SetParent](set-parent.md)
|
||
|
|
- [DetachChildren](detach-children.md)
|