unity check if parent has a certain child code example Example: check if object has parent unity if(transform.parent != null) { }