How to assign material in texture from a database you have?

Like it is written correctly and does not stick
Texture2D treat = AssetDatabase.LoadAssetAtPath("Assets/Materials/Materials/Video/Covers/screenShot"+ numberCapture +".jpg", typeof(Texture2D)) as Texture2D;
_material.SetTexture("_MainTex", treat);
July 2nd 19 at 14:23
1 answer
July 2nd 19 at 14:25
Solution
pastebin.com/EbnYvXYg
Refresh to the download asset saved)

Find more questions by tags C#Unity Game Engine