Enable [ShaderMethod] support for global functions

このコミットが含まれているのは:
Sergio Pedri committed 2022-09-05 01:10:45 +02:00
1 親 1d0856ff12
コミット 10ba55d156
4ファイル変更
+128 -45

検索条件に一致するファイルはありません

+2 -2
ファイルの表示
@@ -77,10 +77,10 @@ public sealed partial class ShaderMethodSourceAttribute : Attribute
return ThrowArgumentExceptionForNonStaticMethod(name);
}
var attributes = function.Method.DeclaringType!.Assembly.GetCustomAttributes<ShaderMethodSourceAttribute>();
IEnumerable<ShaderMethodSourceAttribute> attributes = function.Method.DeclaringType!.Assembly.GetCustomAttributes<ShaderMethodSourceAttribute>();
string methodName = function.Method.GetFullyQualifiedName();
foreach (var attribute in attributes)
foreach (ShaderMethodSourceAttribute attribute in attributes)
{
if (attribute.methodName.Equals(methodName))
{