Quantcast
Channel: Answers for "Change material with EditorScript"
Viewing all articles
Browse latest Browse all 6

Answer by jahroy

$
0
0
Sorry, I assumed you were using C# because of the unfamiliar code I saw as the second parameter of your call to LoadAssetPath(). When I use LoadAssetAtPath() I use it like this: var newMat = AssetDatabase.LoadAssetAtPath("Assets/blue.mat", Material); I'm not sure if that's the problem or not. I would give it a try both ways. I don't have a machine with Unity handy, but I'm curious to see the output of: Debug.Log(typeof(Material); Debug.Log(AssetDatabase.GenerateUniqueAssetPath());

Viewing all articles
Browse latest Browse all 6

Trending Articles