Пример #1
0
        internal static T ParentHasComponent <T>(Transform trans) where T : Component
        {
            if (!(trans != null))
            {
                return((T)((object)null));
            }
            T component = trans.GetComponent <T>();

            if (component)
            {
                return(component);
            }
            return(InternalEditorUtility.ParentHasComponent <T>(trans.parent));
        }