DeepSearch

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(Removing all content from page)
m (Reverted edits by Joseph05408 (Talk); changed back to last version by Llavigne)
Line 1: Line 1:
 +
==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;
 +
}

Revision as of 19:16, 19 October 2009

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; }

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox