D
D
Dmitry Korolev2016-11-24 07:00:54
C++ / C#
Dmitry Korolev, 2016-11-24 07:00:54

How to assign a texture from the database to a material?

It seems to be written correctly, but does not insert
Texture2D treat = AssetDatabase.LoadAssetAtPath("Assets/Materials/Materials/Video/Covers/screenShot"+ numberCapture +".jpg", typeof(Texture2D)) as Texture2D;
_material.SetTexture("_MainTex", treat);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Korolev, 2016-11-27
@adressmoeistranici

pastebin.com/EbnYvXYg
Refresh on both sides of the asset loading saved)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question