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)
55
55
YamlScalarNode folderAssetScalarNode = ( YamlScalarNode ) folderAssetNode ;
56
56
isFolderAsset = folderAssetScalarNode . Value == "yes" ;
57
57
}
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
+ }
58
67
59
68
if ( isFolderAsset )
60
69
{
Original file line number Diff line number Diff line change @@ -16,10 +16,18 @@ public string FolderPath
16
16
get
17
17
{
18
18
string filePath = GetFilePath ( ) ;
19
- return Path . Combine ( Path . GetDirectoryName ( filePath ) , Path . GetFileNameWithoutExtension ( filePath ) ) ;
19
+ return GetFolderPathForMeta ( filePath ) ;
20
20
}
21
21
}
22
22
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
+
23
31
/// <summary>
24
32
///
25
33
/// </summary>
You can’t perform that action at this time.
0 commit comments