Пример #1
0
 public static void SetMatTexture(MaterialTexLoader l)
 {
     foreach (MaterialTexData d in l.materials)
     {
         d.material.SetTexture(MaterialTexLoader.TEX1, AssetDatabase.LoadAssetAtPath <Texture>(d.tex1.GetEditorPath()));
         d.material.SetTexture(MaterialTexLoader.TEX2, AssetDatabase.LoadAssetAtPath <Texture>(d.tex2.GetEditorPath()));
         EditorUtil.SetDirty(d.material);
     }
 }
Пример #2
0
 public static void ClearMatTexture(MaterialTexLoader l)
 {
     foreach (MaterialTexData d in l.materials)
     {
         d.material.SetTexture(MaterialTexLoader.TEX1, null);
         d.material.SetTexture(MaterialTexLoader.TEX2, null);
         EditorUtil.SetDirty(d.material);
     }
 }
Пример #3
0
 void OnEnable()
 {
     loader = target as MaterialTexLoader;
 }