| | |
| | | SetParent(instance); |
| | | } |
| | | |
| | | [MenuItem("GameObject/UI/渐变文本")] |
| | | public static void CreateGradientText() |
| | | { |
| | | var instance = new GameObject("GradientText"); |
| | | var text = instance.AddComponent<GradientText>(); |
| | | text.font = FontUtility.preferred; |
| | | text.fontSize = 22; |
| | | text.alignment = TextAnchor.MiddleCenter; |
| | | text.raycastTarget = false; |
| | | text.horizontalOverflow = HorizontalWrapMode.Overflow; |
| | | text.verticalOverflow = VerticalWrapMode.Overflow; |
| | | SetParent(instance); |
| | | } |
| | | |
| | | [MenuItem("GameObject/UI/TextEx")] |
| | | public static void CreateTextEx() |
| | | { |