public static RunMethodMessage Send(GameObject recipient, string method, GameObject parameter = null) { RunMethodMessage msg = new RunMethodMessage { Recipient = recipient.GetComponent <NetworkIdentity>().netId, //? Method = method, Parameter = parameter != null ? parameter.GetComponent <NetworkIdentity>().netId : NetworkInstanceId.Invalid }; msg.SendTo(recipient); return(msg); }
private string FormatLogMessage(RunMethodMessage message, object response) { return(response is Acknowledged ? $"Executed {message}" : $"Executed {message} with response {response}"); }