VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
static Object AVR.Core.Utils.Misc.GlobalFind ( string  name,
System.Type  type 
)
inlinestatic

Finds an Object in the Scene by name and type including inactive ones

Parameters
nameName of object in question
typeType of object in question
Returns
First object found that has the given name and type. Null if none is found.

Definition at line 194 of file AVR_Utils.cs.

195  {
196  Object[] objs = Resources.FindObjectsOfTypeAll(type);
197 
198  foreach (Object obj in objs)
199  {
200  if (obj.name == name)
201  {
202  return obj;
203  }
204  }
205 
206  return null;
207  }