private void Update() { if (apply) { apply = false; _rawImage.texture = HanziTextureGenerator.RequestCharacterTexture(hanzi, size); } }
private void Awake() { Debug.Assert(font); if (instance == null) { instance = this; } else if (instance != this) { instance = this; } }
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; } }
private void Awake() { _rawImage = GetComponent <RawImage>(); _rawImage.texture = HanziTextureGenerator.RequestCharacterTexture(hanzi, size); }