Asset depreciation method based on unit of production

Hi Everyone, there are a few assets in my company for which I want to set the depreciation method on the number of hours used as in (unit of production) is there any way in the system in which the depreciation is calculated based on the sales invoice, and the number of hours recorded for that. instead of timeline methods