File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,15 @@ public override void ParseFile(string absolutePath)
5555 YamlScalarNode folderAssetScalarNode = ( YamlScalarNode ) folderAssetNode ;
5656 isFolderAsset = folderAssetScalarNode . Value == "yes" ;
5757 }
58+ else
59+ {
60+ // seems folder assets may randomly not have a folderAsset value
61+ // try to identify them by the absence of other data
62+ if ( rootNode . Children . Count == 2 && Directory . Exists ( UnityFolder . GetFolderPathForMeta ( absolutePath ) ) )
63+ {
64+ isFolderAsset = true ;
65+ }
66+ }
5867
5968 if ( isFolderAsset )
6069 {
Original file line number Diff line number Diff line change @@ -16,10 +16,18 @@ public string FolderPath
1616 get
1717 {
1818 string filePath = GetFilePath ( ) ;
19- return Path . Combine ( Path . GetDirectoryName ( filePath ) , Path . GetFileNameWithoutExtension ( filePath ) ) ;
19+ return GetFolderPathForMeta ( filePath ) ;
2020 }
2121 }
2222
23+ /// <summary>
24+ /// Returns the directory path for the specified folder meta.
25+ /// </summary>
26+ public static string GetFolderPathForMeta ( string folderMeta )
27+ {
28+ return Path . Combine ( Path . GetDirectoryName ( folderMeta ) , Path . GetFileNameWithoutExtension ( folderMeta ) ) ;
29+ }
30+
2331 /// <summary>
2432 ///
2533 /// </summary>
You can’t perform that action at this time.
0 commit comments