public override void AssignText(MarkerWithText mrkr, MeshPoint vpoint) { var pvrt = MeshMGMT.GetSelectedVert(); if ((vpoint.uvpoints.Count > 1) || (pvrt == vpoint)) { Texture tex = MeshMGMT.target.meshRenderer.sharedMaterial.mainTexture; if (pvrt == vpoint) { mrkr.textm.text = (vpoint.uvpoints.Count > 1) ? ((vpoint.uvpoints.IndexOf(MeshMGMT.SelectedUV) + 1).ToString() + "/" + vpoint.uvpoints.Count.ToString() + (vpoint.SmoothNormal ? "s" : "")) : ""; float tsize = tex == null ? 128 : tex.width; mrkr.textm.text += ("uv: " + (MeshMGMT.SelectedUV.EditedUV.x * tsize) + "," + (MeshMGMT.SelectedUV.EditedUV.y * tsize)); } else { mrkr.textm.text = vpoint.uvpoints.Count.ToString() + (vpoint.SmoothNormal ? "s" : ""); } } else { mrkr.textm.text = ""; } }
public override void AssignText(MarkerWithText mrkr, MeshPoint vpoint) { var pvrt = MeshMGMT.GetSelectedVert(); if ((vpoint.uvpoints.Count > 1) || (pvrt == vpoint)) { //Texture tex = meshMGMT.target.GetTextureOnMaterial();//meshRenderer.sharedMaterial.mainTexture; if (pvrt == vpoint) { mrkr.textm.text = (vpoint.uvpoints.Count > 1) ? ((vpoint.uvpoints.IndexOf(MeshMGMT.SelectedUV) + 1).ToString() + "/" + vpoint.uvpoints.Count.ToString() + (vpoint.SmoothNormal ? "s" : "")) : ""; } else { mrkr.textm.text = vpoint.uvpoints.Count.ToString() + (vpoint.SmoothNormal ? "s" : ""); } } else { mrkr.textm.text = ""; } }