(Type type, string methodName)
| 400 | } |
| 401 | |
| 402 | public LuaCSFunction GetMethodWrap(Type type, string methodName) |
| 403 | { |
| 404 | //UnityEngine.Debug.LogWarning("GetMethodWrap:" + type + " " + methodName); |
| 405 | if (!methodsCache.ContainsKey(type)) |
| 406 | { |
| 407 | methodsCache[type] = new Dictionary<string, LuaCSFunction>(); |
| 408 | } |
| 409 | var methodsOfType = methodsCache[type]; |
| 410 | if (!methodsOfType.ContainsKey(methodName)) |
| 411 | { |
| 412 | MemberInfo[] methods = type.GetMember(methodName, BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.IgnoreCase); |
| 413 | if (methods == null || methods.Length == 0 || |
| 414 | #if UNITY_WSA && !UNITY_EDITOR |
| 415 | methods[0] is MethodBase |
| 416 | #else |
| 417 | methods[0].MemberType != MemberTypes.Method |
| 418 | #endif |
| 419 | ) |
| 420 | { |
| 421 | return null; |
| 422 | } |
| 423 | methodsOfType[methodName] = _GenMethodWrap(type, methodName, methods).Call; |
| 424 | } |
| 425 | return methodsOfType[methodName]; |
| 426 | } |
| 427 | |
| 428 | public LuaCSFunction GetMethodWrapInCache(Type type, string methodName) |
| 429 | { |
nothing calls this directly
no outgoing calls
no test coverage detected