public override void AssignText(MarkerWithText markers, PainterMesh.MeshPoint point)
        {
            var vrt = MeshMGMT.GetSelectedVertex();

            if (point.vertices.Count > 1 || vrt == point)
            {
                var tex = MeshEditorManager.target.meshRenderer.sharedMaterial.mainTexture;

                if (vrt == point)
                {
                    var   text  = (point.vertices.Count > 1) ? ((point.vertices.IndexOf(MeshMGMT.SelectedUv) + 1) + "/" + point.vertices.Count + (point.smoothNormal ? "s" : "")) : "";
                    float tSize = !tex ? 128 : tex.width;
                    text += ("uv: " + (MeshMGMT.SelectedUv.EditedUv.x * tSize) + "," + (MeshMGMT.SelectedUv.EditedUv.y * tSize));
                    markers.textm.text = text;
                }
                else
                {
                    markers.textm.text = point.vertices.Count +
                                         (point.smoothNormal ? "s" : "");
                }
            }
            else
            {
                markers.textm.text = "";
            }
        }
Beispiel #2
0
        public override void AssignText(MarkerWithText markers, MeshPoint point)
        {
            var selected = MeshMGMT.GetSelectedVertex();

            if (point.vertices.Count > 1 || selected == point)
            {
                if (selected == point)
                {
                    markers.textm.text = (point.vertices.Count > 1) ? (
                        Path.Combine((point.vertices.IndexOf(MeshMGMT.SelectedUv) + 1).ToString(), point.vertices.Count +
                                     (point.smoothNormal ? "s" : ""))

                        ) : "";
                }
                else
                {
                    markers.textm.text = point.vertices.Count +
                                         (point.smoothNormal ? "s" : "");
                }
            }
            else
            {
                markers.textm.text = "";
            }
        }