예제 #1
0
        private static void ParseRpc(NetworkMessage rpcMsg)
        {
            NetworkMessage.RpcInvokeMessage invokeMessage = (NetworkMessage.RpcInvokeMessage)rpcMsg;
            NetworkEntity entity = null;

            try {
                entity = objectRegistryCallback(invokeMessage.objectId);
            }
            catch (EntityNotFoundException e) {
                Debug.LogWarning("Unable to invoke RPC on network entity with id " + invokeMessage.objectId.id);
                return;
            }
            finally {
                entity.ReceiveRpc(invokeMessage.functionName, invokeMessage.arguments);
            }
        }