blob: 5edd0777cc934beb2ffc2c3630f8996bfa3446df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
using System;
using System.Reflection;
namespace UnityEngine
{
#if UNITY_FLASH
[NotRenamed]
internal static class ScriptingMethodHelper
{
[NotRenamed]
internal static MethodInfo GetMethodInfo(Type type, string methodName)
{
return type.GetMethod(methodName);
}
[NotRenamed]
internal static int NumberOfArgumentsOf(MethodInfo methodInfo)
{
return methodInfo.GetParameters().Length;
}
[NotRenamed]
internal static Type NthArgumentType(MethodInfo methodInfo, int index)
{
var args = methodInfo.GetParameters();
if (args.Length <= index)
return null;
return args[index].ParameterType;
}
}
#endif
}
|