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