How can I attach editor script on object

I want to attach editor script of RecorderController on Object but it is not working as it says Editor scripts cannot be attached on object. I want to attach the editor script on Object and dont want to call any of its functions in build I have enough required conditions for it. I just want to access its functions in playmode in editor

Make that script a MonoBehaviour and enclose editor-only code in #if UNITY_EDITOR … #endif preprocessor conditions.

It was in metadata So I was not able to edit it.

But the issue is now solved.