DeepSearch

From Unify Community Wiki
Revision as of 20:40, 10 January 2012 by NCarter (Talk | contribs)

Jump to: navigation, search
This article is a stub.

You can help UnifyWiki by expanding it.


JS Script

<javascript>

static function deepSearch (t : Transform, s : String) : Transform { var dt : Transform = t.Find (s); if (dt) return dt; else { for (var child : Transform in t) { dt = deepSearch (child, s); if (dt) return dt; } } return null; } </javascript>

C# Script

   static public Transform deepSearch(Transform t, string s)
   {
       Transform dt = t.Find(s);
       if (dt != null)
           return dt;
       else
       {
           foreach (Transform child in t)
           {
               dt = deepSearch(child, s);
               if (dt != null)
                   return dt;
           }
       }
       return null;
   }
</csharp>
Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox