Compare commits
No commits in common. "80cc8af228c572b5bf10862f9afec53ce6f5d11b" and "c13404077c4f6889687160f5e729dc81bb82fee9" have entirely different histories.
80cc8af228
...
c13404077c
@ -60,22 +60,7 @@ namespace QFramework
|
|||||||
int.TryParse(index, out matIndex);
|
int.TryParse(index, out matIndex);
|
||||||
if (string.IsNullOrEmpty(matName) == false)
|
if (string.IsNullOrEmpty(matName) == false)
|
||||||
{
|
{
|
||||||
//mesh.materials[matIndex].CopyMatchingPropertiesFromMaterial();
|
mesh.materials[matIndex] = Resources.Load<Material>("Mat/" + matName);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
if (mainTexture != null)
|
if (mainTexture != null)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user