Ejemplo n.º 1
0
 private void Update()
 {
     if (apply)
     {
         apply             = false;
         _rawImage.texture = HanziTextureGenerator.RequestCharacterTexture(hanzi, size);
     }
 }
Ejemplo n.º 2
0
    private void Awake()
    {
        Debug.Assert(font);

        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            instance = this;
        }
    }
Ejemplo n.º 3
0
 public static void CheckInstance()
 {
     if (instance == null)
     {
         instance = FindObjectOfType <HanziTextureGenerator>();
         if (instance == null)
         {
             Debug.LogError("There is no [Character Generator] in Scene");
             return;
         }
     }
     else if (instance.font == null)
     {
         Debug.LogError("There is no [Font] attached on [Character Generator]");
         return;
     }
 }
Ejemplo n.º 4
0
 private void Awake()
 {
     _rawImage         = GetComponent <RawImage>();
     _rawImage.texture = HanziTextureGenerator.RequestCharacterTexture(hanzi, size);
 }