Exemplo n.º 1
0
        /// <summary>
        /// 初始化值为了和Text的初始值保持一致
        /// </summary>
        /// <param name="txt"></param>
        public static void InitValue(LocalizationText txt)
        {
            txt.color = new Color(50f / 255f, 50f / 255f, 50f / 255f);
            RectTransform contentRT = txt.GetComponent <RectTransform>();

            contentRT.sizeDelta  = new Vector2(160f, 30f);
            txt.gameObject.layer = LayerMask.NameToLayer(UI_LAYER_NAME);
        }