コード例 #1
0
    public void SetPosition(int aObjectId, Vector3 aPosition, Quaternion aRotation, int aAreaId)
    {
        // Send a message to the given game object asking it to change its position
        ServerNetwork.NetworkObject obj = serverNet.GetNetObjById(aObjectId);
        long aClientId = serverNet.GetOwnerClientId(aObjectId);

        // Send the message to the client
        serverNet.CallRPC("SetPositionFromServer", aClientId, aObjectId, aPosition, aRotation, aAreaId);
    }