The method is very simple: as long as we search for VS: the string of Lua/Generate All, and then follow the logic of the past, we can find the following code
IsObsolete Chinese meaning: Is it expired; Is it abandoned;
Although the meaning is not suitable, it is good to make do to achieve the same functional effect
I personally think that for these common functions, ToLua authors should write down the instructions (ReadMe.md) NoToLuaAttribute on the home page of the github repository, which will be much more user-friendly.
How to use, it's very simple:
public class TestClass
{
// 默认都会被 wrapper
public float inWrapperField;
public void InWrapperFunc() {
}
// 不想被 wrapper 那就加 Attribute
[NoToLua] // NoToLuaAttribute 的简写 c#.net 的语法糖可省去 Attribute
public float thisIsIgnoreField;
[NoToLua]
public void ThisIsIgnoreFunc() {
}
}
In this way, the and members in the above TestClass
class will not be wrapped by ToLua topublic float thisIsIgnoreField;
public void ThisIsIgnoreFunc() {}