public UnityEngine.Object LoadTmpl(string name) { string[] strList = name.Split(new Char[] { '/', }, StringSplitOptions.RemoveEmptyEntries); string index = strList[strList.Length - 1]; UnityEngine.Object obj = LoadResource.Load(name); _dictTmpl[index] = obj; return(obj); }
static public UnityEngine.GameObject LoadAsGameObj(string path) { GameObject ins = null; var obj = LoadResource.Load(path); if (obj != null) { ins = UnityEngine.Object.Instantiate(obj) as GameObject; if (null != ins) { ins.name = obj.name; } else { ZLog.E(null, "{0} Instantiate fail", path); } } return(ins); }