public override void Set(Vector4[] dta) { VertexSolution vs = GetMySolution(); if ((vs.SameSizeValue != null) || (vs.vals[2].VertDataType != VertexNull.inst) || (vs.vals[3].VertDataType != VertexNull.inst)) { CurMeshDta.mesh.SetUVs(MyUVChanel(), new List <Vector4>(dta)); } else { Vector2[] v2s = new Vector2[dta.Length]; for (int i = 0; i < dta.Length; i++) { Vector4 v4 = dta[i]; v2s[i] = new Vector2(v4.x, v4.y); } switch (MyUVChanel()) { case 0: CurMeshDta.mesh.uv = v2s; break; case 1: CurMeshDta.mesh.uv2 = v2s; break; case 2: CurMeshDta.mesh.uv3 = v2s; break; case 3: CurMeshDta.mesh.uv3 = v2s; break; } } }
public override void SetDefaults(VertexSolution to) { base.SetDefaults(to); if (myIndex != 1) { return; } to.enabled = true; int ind = VertexUV.inst[0].myIndex; to.vals[0].typeIndex = ind; to.vals[0].valueIndex = 0; to.vals[1].typeIndex = ind; to.vals[1].valueIndex = 1; ind++; to.vals[2].typeIndex = ind; to.vals[2].valueIndex = 0; to.vals[3].typeIndex = ind; to.vals[3].valueIndex = 1; }
public virtual void SetDefaults(VertexSolution to) { for (int i = 0; i < to.vals.Count; i++) { to.vals[i].valueIndex = i; } }
public override void SetDefaults(VertexSolution to) { base.SetDefaults(to); to.enabled = true; to.sameSizeDataIndex = VertexColor.inst.myIndex; for (int i = 0; i < 4; i++) { to.vals[i].typeIndex = VertexColor.inst.myIndex; } }
public override void SetDefaults(VertexSolution to) { base.SetDefaults(to); to.enabled = true; to.sameSizeDataIndex = VertexNormal.inst.myIndex; }