06-13-2021, 08:17 PM
(This post was last modified: 06-13-2021, 09:13 PM by boriskourt.)
Does updating MaterialID in MetaCGOptions on an already generated segment switch the active material?
I have a Volume Mesh with two material slots, id 0 and id 1. I want to flip between them at runtime, on an already (runtime) generated spline.
var spline = obj.GetComponent<CurvySpline>();
foreach (var point in spline.ControlPointsList)
{
var cg = point.GetMetadata<MetaCGOptions>(true);
cg.MaterialID = 1;
}
spline.SetDirtyAll();
This currently doesn't make any difference.
I have a Volume Mesh with two material slots, id 0 and id 1. I want to flip between them at runtime, on an already (runtime) generated spline.
var spline = obj.GetComponent<CurvySpline>();
foreach (var point in spline.ControlPointsList)
{
var cg = point.GetMetadata<MetaCGOptions>(true);
cg.MaterialID = 1;
}
spline.SetDirtyAll();
This currently doesn't make any difference.