Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Default font if no specific font is assigned
- private const string DefaultFont = "Calibri";
- private void method_15(bool bool_4 = false)
- {
- if (!Boolean_0) return;
- // Obtener etiquetas de gradiente y jitter
- string gradientTag = (bool_4 || Int32_0 <= 0) ? "" : UTM_StaticData.GetGradientTag(Int32_0.ToString());
- string jitterTag = (bool_4 || Int32_0 <= 0) ? "" : UTM_StaticData.GetJitterTag(Int32_0.ToString());
- // Construir el texto base
- string text = gradientTag + jitterTag + String_1;
- // Aplicar efecto de color y negrita
- if (!string.IsNullOrEmpty(NickType))
- {
- text = $"<c={NickType}><b>{text}</b></c>";
- }
- else
- {
- text = "<b>" + text + "</b>";
- }
- // ✅ Apply text effects (color/negrita) según NickTypeTitle
- if (!string.IsNullOrEmpty(NickEffect))
- {
- text = $"<j={NickEffect}><b>{text}</b></j>";
- }
- else
- {
- text = "<b>" + text + "</b>";
- }
- // Aplicar tamaño de texto
- UnionTextMesh_0.size = 18;
- // Limpiar texto si es necesario
- if (Boolean_2)
- text = "";
- // Asignar y reconstruir el texto si ha cambiado
- if (text != UnionTextMesh_0.Text)
- {
- UnionTextMesh_0.Text = text;
- UnionTextMesh_0.Rebuild();
- }
- // Aplicar la fuente: si NickFont tiene valor y está en el bundle, se asigna directamente.
- if (!string.IsNullOrEmpty(NickFont))
- {
- if (FontManager.LoadedFonts.TryGetValue(NickFont, out UTMFontData nickFontData))
- {
- UnionTextMesh_0.font = nickFontData.font;
- Debug.Log($"[INFO] Applied Nick font: {nickFontData.font.name} for {NickFont}");
- }
- else
- {
- Debug.LogWarning($"[WARNING] Font '{NickFont}' not found in bundle. Using default.");
- }
- }
- else
- {
- // Si NickFont no está definido, se sigue la lógica anterior (por ejemplo, usar DefaultFont o UserFonts).
- string assignedFont = DefaultFont;
- if (FontManager.LoadedFonts.TryGetValue(assignedFont, out UTMFontData selectedFontData))
- {
- UnionTextMesh_0.font = selectedFontData.font;
- Debug.Log($"[INFO] Applied font: {selectedFontData.font.name} for {assignedFont}");
- }
- else
- {
- Debug.LogWarning($"[WARNING] Font '{assignedFont}' not found. Using default.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment