Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

想问个问题,是否在热更新的dll中无法使用反射? #41

Open
egametang opened this issue May 21, 2016 · 0 comments
Open

Comments

@egametang
Copy link

例如想打印热更新的dll的名字, 会报错
[Message]
public class Entry
{
public static void Init()
{
UnityEngine.Debug.Log(typeof(Entry).Assembly.FullName);
}
}

TargetException: Object does not match target type.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:236)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
CLRSharp.Method_Common_System.Invoke (CLRSharp.ThreadContext context, System.Object _this, System.Object[] _params) (at Assets/Plugins/CLRSharp/CLRSharp/Type/System/System_Type.cs:483)
CLRSharp.Method_Common_System.Invoke (CLRSharp.ThreadContext context, System.Object _this, System.Object[] _params, Boolean bVisual) (at Assets/Plugins/CLRSharp/CLRSharp/Type/System/System_Type.cs:329)
CLRSharp.StackFrame.Call (CLRSharp.ThreadContext context, IMethod _clrmethod, Boolean bVisual) (at Assets/Plugins/CLRSharp/CLRSharp/Execute/StackFrame.cs:444)
CLRSharp.ThreadContext.RunCode (CLRSharp.StackFrame stack, CLRSharp.CodeBody body) (at Assets/Plugins/CLRSharp/CLRSharp/Execute/Context.cs:748)
CLRSharp.ThreadContext.ExecuteFunc (IMethod_Sharp method, System.Object _this, System.Object[] _params) (at Assets/Plugins/CLRSharp/CLRSharp/Execute/Context.cs:150)
CLRSharp.Method_Common_CLRSharp.Invoke (CLRSharp.ThreadContext context, System.Object _this, System.Object[] _params, Boolean bVisual) (at Assets/Plugins/CLRSharp/CLRSharp/Type/CLRSharp/CLRSharp_Type.cs:518)
CLRSharp.Method_Common_CLRSharp.Invoke (CLRSharp.ThreadContext context, System.Object _this, System.Object[] _params) (at Assets/Plugins/CLRSharp/CLRSharp/Type/CLRSharp/CLRSharp_Type.cs:531)
Init.Start () (at Assets/Scripts/Init.cs:38)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant