Fix zindex property not working on polysec component.
This commit is contained in:
@@ -22,7 +22,9 @@ namespace Cryville.Crtr.Components {
|
||||
}
|
||||
protected void UpdateZIndex() {
|
||||
if (!mesh.Initialized) return;
|
||||
mesh.Renderer.material.renderQueue = _zindex;
|
||||
foreach (var mat in mesh.Renderer.materials) {
|
||||
mat.renderQueue = _zindex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -110,6 +110,7 @@ namespace Cryville.Crtr.Components {
|
||||
if (body.FrameName != null) AddMat(materials, body.FrameName);
|
||||
if (tail.FrameName != null) AddMat(materials, tail.FrameName);
|
||||
mesh.Renderer.materials = materials.ToArray();
|
||||
UpdateZIndex();
|
||||
}
|
||||
|
||||
void AddMat(List<Material> list, string frame) {
|
||||
|
Reference in New Issue
Block a user