Convert Object texture coordinates to UV
You have to use baking.


In the UV Editor create a new image (called Baker on my pic)
Create your material in the Shader Editor
Add a new image texture node in Shader Editor. Click on the browse icon and find an image on your computer
With the image texture node active, switch to the Render tab and go the Bake settings. Under Bake Type choose Diffuse and under Influence select only color, then hit on Bake.
Save the new texture file.
Change the material's texture image to the baked.