Version: 2018.1
public static bool IsDescendantOrSelf (Transform father, Transform child);

Parameters

fatherThe transform to compare against.
childThe starting transform to search up the hierarchy.

Returns

bool Is child equal to father or is a descendant.

Description

Helper function to determine if the child is a descendant of father or is father.