Example #1
0
        public static LevelPrefabFileInfo CreateSubdirectory(LevelPrefabFileInfo parent, string name)
        {
            LevelPrefabFileInfo child = new LevelPrefabFileInfo(name, parent);

            parent.AddChildInfo(child);

            return(child);
        }
Example #2
0
        public static LevelPrefabFileInfo AddOrUpdatePrefabInfo(LevelPrefabFileInfo parent, FileInfo file)
        {
            string prefab_path        = Resource.NormalizePath(file.FullName);
            string name               = Path.GetFileNameWithoutExtension(prefab_path);
            LevelPrefabFileInfo entry = parent.GetChildFileInfo((LevelPrefabFileInfo value) => value.Name_ == name);

            if (entry is null)
            {
                entry = new LevelPrefabFileInfo(name, prefab_path, parent);
                parent.AddChildInfo(entry);
            }
            else
            {
                entry.CustomPrefabPath_ = prefab_path;
            }

            return(entry);
        }