Tencent / xLua

xLua is a lua programming solution for C# ( Unity, .Net, Mono) , it supports android, ios, windows, linux, osx, etc.
Other
9.33k stars 2.45k forks source link

xlua.private_accessible 使用的一些疑惑 #877

Open micyu opened 3 years ago

micyu commented 3 years ago

1、通过这种方式 xlua.hotfix(CS.GameUI.MLobbyTaskDailyPanel,"OnShow",OnShow) 热更的热更对象私有属性、base都可以使用,不需要添加 xlua.private_accessible

2、通过这种方式 xlua.hotfix(“GameUI.MLobbyTaskDailyPanel”,"OnShow",OnShow) 必须添加 xlua.private_accessible 才能使用base以及访问私有属性字段。

3、xlua.hotfix("GameUI.MLobbyRelationShipPanel+GiftListItemBusiness","OnRefresh",OnRefresh) 一个内联类又能直接访问base和私有字段,那如果“GiftListItemBusiness”定义为非“public”的其私有域又是什么样子的?

是否是有啥约定规则在里面,FAQ跟Issuse搜了一下没有相关的说明,麻烦了。

chexiongsheng commented 3 years ago

1和2应该没区别 其实你拿不准,就都xlua.private_accessible