public UnityAssetMetaData(IContentHierarchy parent, string fileName) : base(parent, fileName) { //PreviewImage = @"file://D:\Workspace\EngTools\Data\UnityAssetStore\3dJeebs\3D Models\Assets\simple_low_poly_village_buildings\materials\farms.mat.preview.png"; //d:\Workspace\EngTools\Data\UnityAssetStore\3dJeebs\3D Models\ farm_house_lvl3.prefab.preview.png //PreviewImage = $"file://{PreviewImagePath}\\{FileName}.preview.png"; }
public ContentHierarchy(IContentHierarchy parent, string fileName) { Parent = parent; if (Parent == null) { Root = this; Depth = 1; } else { Root = Parent.Root; Depth = Parent.Depth + 1; Parent.Children.Add(this); } FileName = fileName; IsExpanded = Depth <= 3; Children = new List <IContentHierarchy>(); }
internal static IContentHierarchy Add(IContentHierarchy packageRoot, string assetPath) { var node = packageRoot; if (node == null) { return(null); } var parts = assetPath.Split('/'); for (int i = 0; i < parts.Length; ++i) { node = node.EnsureChild(parts[i]); } node.RelativePath = assetPath; return(node); }