Compare commits
2 commits
e413f16daf
...
1111f0d7a0
| Author | SHA1 | Date | |
|---|---|---|---|
| 1111f0d7a0 | |||
| d47a03a36e |
6 changed files with 2 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace gay.lilyy.Common
|
namespace gay.lilyy.Common
|
||||||
|
|
@ -41,7 +42,7 @@ namespace gay.lilyy.Common
|
||||||
{
|
{
|
||||||
if (root == null) return null;
|
if (root == null) return null;
|
||||||
|
|
||||||
T[] components = root.GetComponentsInChildren<T>(true);
|
T[] components = root.GetComponentsInChildren<T>(true).Concat(root.GetComponents<T>()).ToArray();
|
||||||
if (components.Length == 0)
|
if (components.Length == 0)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue