Exemplo n.º 1
0
        public override IEnumerable <Object> FetchDependencies(ISerializedFile file, bool isLog = false)
        {
            foreach (Object @object in base.FetchDependencies(file, isLog))
            {
                yield return(@object);
            }

            if (!ParentPrefab.IsNull)
            {
                yield return(ParentPrefab.GetObject(file));
            }
            yield return(RootGameObject.GetObject(file));
        }
Exemplo n.º 2
0
        public IEnumerable <EditorExtension> FetchObjects(bool isLog = false)
        {
            GameObject           root         = RootGameObject.GetObject();
            List <Object>        dependencies = ObjectUtils.CollectDependencies(root, isLog);
            IEnumerable <Object> deps         = dependencies.Where(t => !t.IsAsset);

#warning dependency of other prefab's component?

            IEnumerable <Object> gos = deps.Where(t => t.ClassID == ClassIDType.GameObject);
            foreach (GameObject go in gos)
            {
                yield return(go);
            }
            IEnumerable <Object> comps = deps.Where(t => t.ClassID != ClassIDType.GameObject).OrderBy(t => t.ClassID);
            foreach (Component comp in comps)
            {
                yield return(comp);
            }
        }
Exemplo n.º 3
0
 public string GetName()
 {
     return(RootGameObject.GetObject(File).Name);
 }
Exemplo n.º 4
0
        public IEnumerable <EditorExtension> FetchObjects(ISerializedFile file, bool isLog = false)
        {
            GameObject root = RootGameObject.GetObject(file);

            return(FetchObjects(root));
        }