Declaration
public void OwnerCall(string method, Action onFinish, params object[] args)
Description
Makes a remote call to the specified function in the object owner’s script.
Parameter
method | Name of the function defined in the Lua file of the ParaScript |
onFinish | Callback notification when a remote call is completed |
args | Variable parameter |
function RemoteMethodName(info,num)
print("Recv call ",info,num);
return "remote method retruned";
end
function OnNetSpawned()
self:OwnerCall("RemoteMethodName",function(result)
print(result);
end,"hello",123);
end