[fix] 修复Additional Compiler Arguments中输入 -nullable:enable 之后,Editor抛出InvalidCastException的bug。来自报告 https://github.com/focus-creative-games/hybridclr/issues/116
parent
7c29ab804b
commit
71ad34d7ac
|
@ -59,8 +59,9 @@ namespace HybridCLR.Editor.Settings
|
||||||
protected static string GetFilePath()
|
protected static string GetFilePath()
|
||||||
{
|
{
|
||||||
return typeof(T).GetCustomAttributes(inherit: true)
|
return typeof(T).GetCustomAttributes(inherit: true)
|
||||||
|
.Where(v => v is FilePathAttribute)
|
||||||
.Cast<FilePathAttribute>()
|
.Cast<FilePathAttribute>()
|
||||||
.FirstOrDefault(v => v != null)
|
.FirstOrDefault()
|
||||||
?.filepath;
|
?.filepath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue