Compare commits

..

No commits in common. "80cc8af228c572b5bf10862f9afec53ce6f5d11b" and "c13404077c4f6889687160f5e729dc81bb82fee9" have entirely different histories.

View File

@ -60,22 +60,7 @@ namespace QFramework
int.TryParse(index, out matIndex);
if (string.IsNullOrEmpty(matName) == false)
{
//mesh.materials[matIndex].CopyMatchingPropertiesFromMaterial();
var mat = Resources.Load<Material>("Mat/" + matName);
var mats = new Material[mesh.materials.Length];
for (int i = 0; i < mesh.materials.Length; i++)
{
if (i == matIndex)
{
mats[i] = mat;
}
else
{
mats[i] = mesh.materials[i];
}
}
mesh.materials = mats;
mesh.materials[matIndex] = Resources.Load<Material>("Mat/" + matName);
}
if (mainTexture != null)
{