using UnityEngine;
namespace X10D.Unity;
///
/// Extension methods for .
///
public static class ComponentExtensions
{
///
/// Returns an array of components of the specified type, excluding components that live on the object to which this
/// component is attached.
///
/// The component whose child components to retrieve.
/// The type of the components to retrieve.
/// An array representing the child components.
public static T[] GetComponentsInChildrenOnly(this Component component)
{
return component.gameObject.GetComponentsInChildrenOnly();
}
}