Skip to content

子类同时使用Hotfix 和 LuaCallCSharp标签后,无法在接口里调用父类接口。 #311

@xfilson

Description

@xfilson

重现如下:修改HotfixTest2.cs

[Hotfix]
[LuaCallCSharp]
public class BaseTest : BaseTestBase
{
public override void Foo(int p)
{
Debug.Log("BaseTest.Foo, p = " + p);
}
}

运行HotfixTest2场景,会报错:
LuaException: [string "Init"]:112: attempt to call a nil value (upvalue 'func')
stack traceback:
[string "Init"]:112: in method 'Foo'
[string "chunk"]:4: in function <[string "chunk"]:2>
XLua.LuaEnv.ThrowExceptionFromError (Int32 oldTop) (at Assets/XLua/Src/LuaEnv.cs:430)
XLua.DelegateBridge.__Gen_Delegate_Imp22 (System.Object p0, Int32 p1) (at Assets/XLua/Gen/DelegatesGensBridge.cs:650)
BaseTest.Foo (Int32 p)
HotfixTest2.Start () (at Assets/XLua/Examples/08_Hotfix/HotfixTest2.cs:382)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions