源战役客户端
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

35 líneas
753 B

using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class UIFontDirty : MonoBehaviour
{
bool isDirty = false;
Font dirtyFont = null;
void Awake()
{
Font.textureRebuilt += delegate (Font font1)
{
isDirty = true;
dirtyFont = font1;
};
}
void LateUpdate()
{
if (isDirty)
{
isDirty = false;
foreach (Text text in GameObject.FindObjectsOfType<Text>())
{
if (text.font == dirtyFont)
{
text.FontTextureChanged();
}
}
print("textureRebuilt -->> " + dirtyFont.name);
dirtyFont = null;
}
}
}