how to check that is a gameobject has a parent in unity3d code example Example: check if object has parent unity if(transform.parent != null) { }