You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
据“Programming_Guide”里面介绍,如果上面的函数是UFunction,则在lua中可以这样调用:
local Level, Health, Name = self:GetPlayerBaseInfo()
但如果以上函数是通过静态导出的,如使用ADD_FUNCTION宏导出的,则不能这样调,而需要:
local Level, Health, Name
Level, Health, Name = self:GetPlayerBaseInfo(Level, Health, Name)
不单参数必须填写(否则报参数个数不对的问题),还需要在返回的地方接住这些引用被修改后的值。
请问有更好的方法吗?
The text was updated successfully, but these errors were encountered:
对于含非const引用参数的函数,如:
void GetPlayerBaseInfo(int32& Level, float& Health, FString& Name);
据“Programming_Guide”里面介绍,如果上面的函数是UFunction,则在lua中可以这样调用:
local Level, Health, Name = self:GetPlayerBaseInfo()
但如果以上函数是通过静态导出的,如使用ADD_FUNCTION宏导出的,则不能这样调,而需要:
local Level, Health, Name
Level, Health, Name = self:GetPlayerBaseInfo(Level, Health, Name)
不单参数必须填写(否则报参数个数不对的问题),还需要在返回的地方接住这些引用被修改后的值。
请问有更好的方法吗?
The text was updated successfully, but these errors were encountered: