TextMesh.anchor

Unity · Версия 2020.3 LTS · Scripting · TextMesh

TextMesh.anchor

public TextAnchor anchor;

Описание

Какая точка текста совпадает с позицией Transform.

using UnityEngine;

public class Example : MonoBehaviour
{
    void Start()
    {
        GetComponent<TextMesh>().anchor = TextAnchor.MiddleCenter;
    }
}

Обновлено 17 ноября 2026 г.