unity remove parent

C#
transform.parent = null;
Source

Also in C#: