ParaScript.OwnerCall

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

methodName of the function defined in the Lua file of the ParaScript
onFinishCallback notification when a remote call is completed
argsVariable 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