类访问
CS.UnityEngine.Vector3
字段/属性访问访问
CS.UnityEngine.Vector3.one
成员方法访问访问
CS.UnityEngine.Vector3:Normalize()
静态方法访问访问 CS.UnityEngine.Vector3.Dot(CS.UnityEngine.Vector3.one,CS.UnityEngine.Vector3.one)
开启私有成员访问权限
xlua.private_accessible(CS.UnityEngine.Vector3)
属性set修复
xlua.hotfix(CS.NameSpace.ClassName,'set_PropertyName', function(self)
fix code
end)
属性get修复
xlua.hotfix(CS.NameSpace.ClassName,'get_PropertyName', function(self)
fix code
end)
成员方法修复
xlua.hotfix(CS.NameSpace.ClassName, 'MethodName', function(self, param0,param1)
fix code
end)
静态方法修复
xlua.hotfix(CS.NameSpace.ClassName, 'MethodName', function(param0,param1)
fix code
end)
创建指定类型数组
local arr = CS.System.Array.CreateInstance(typeof(CS.System.Int32),2)
arr [0] = 0
arr [0] = 1
创建指定类型Dictionary
local dicType = CS.System.Collections.Generic.Dictionary(CS.System.Int32,CS.UnityEngine.Vector3)
local dicIV = dicType()
创建指定类型List
local listType = CS.System.Collections.Generic.List(CS.System.Int32)
local listInt = listType()
遍历Dictionary
for k,v in pairs(dict) do
if k == key then
print (v)
end
end
Action 回调函数赋值
local actionFunc = function()
fix code
end
SetAction(actionFunc)