If the item is unmanaged, then unit cost can be edited.
If the item is managed, and there is quantity in stock, the unit cost cannot be edited. This is because the Quantity * Unit cost is the value for the item. This value is tracked on your books as a current asset in Xero, under the "612- Stock asset" account.
Have a look at similar frequently asked questions or visit our FAQs page for more information