Asset Dump

This commit is contained in:
2026-06-03 13:46:13 -07:00
parent e362aaeb43
commit 9091388bc2
20821 changed files with 26544125 additions and 58 deletions
@@ -0,0 +1,38 @@
using UnityEngine;
using System.Collections;
public static class TransformDeepChildExtension
{
//Breadth-first search
public static Transform FindDeepChild(this Transform aParent, string aName)
{
var result = aParent.Find(aName);
if (result != null)
return result;
foreach(Transform child in aParent)
{
result = child.FindDeepChild(aName);
if (result != null)
return result;
}
return null;
}
/*
//Depth-first search
public static Transform FindDeepChild(this Transform aParent, string aName)
{
foreach(Transform child in aParent)
{
if(child.name == aName )
return child;
var result = child.FindDeepChild(aName);
if (result != null)
return result;
}
return null;
}
*/
}