Getting texture from project files and placing in script

I’m trying to get a texture from my project files and make it so a object changes it while ingame. I know I need to use:

   object.renderer.material.mainTexture = newTexture;

However how do I make the script find the file? Do I have to define a variable or could I just do something like:

   object.renderer.material.mainTexture = project/assets/newtexture.jpg;

Please help. Thanks!

You want LoadAssetAtPath for that.