Method TryRemoveParent
TryRemoveParent(bool)
Removes the parent of the NetworkObject's transform
Declaration
public bool TryRemoveParent(bool worldPositionStays = true)
Parameters
Type | Name | Description |
---|---|---|
bool | worldPositionStays | If true, the parent-relative position, scale and rotation are modified such that the object keeps the same world space position, rotation and scale as before. |
Returns
Type | Description |
---|---|
bool |
Remarks
This is a more convenient way to remove the parent without having to cast the null value to either GameObject or NetworkObject