diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Export/FlashHelper.cs |
Diffstat (limited to 'Runtime/Export/FlashHelper.cs')
-rw-r--r-- | Runtime/Export/FlashHelper.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Runtime/Export/FlashHelper.cs b/Runtime/Export/FlashHelper.cs new file mode 100644 index 0000000..5edd077 --- /dev/null +++ b/Runtime/Export/FlashHelper.cs @@ -0,0 +1,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 +} |