protected void ProcessFont(string resPath) { var loader = KFontLoader.Load(resPath, (isOk, _font) => { if (!IsDestroy) { var label = DependencyComponent as Text; label.font = _font; label.text = label.text + " "; } OnFinishLoadDependencies(_font); }); this.ResourceLoaders.Add(loader); }
protected void ProcessFont(string resPath) { var loader = KFontLoader.Load(resPath, (isOk, _font) => { if (!IsDestroy) { var label = DependencyComponent as Text; //foreach (UILabel label in gameObject.GetComponents<UILabel>()) { label.font = _font; } } OnFinishLoadDependencies(_font); }); this.ResourceLoaders.Add(loader); }