Load() public static méthode

public static Load ( string path, Font>.Action callback = null ) : FontLoader
path string
callback Font>.Action
Résultat FontLoader
        protected void ProcessFont(string resPath)
        {
            var loader = FontLoader.Load(resPath, (isOk, _font) =>
            {
                if (!IsDestroy)
                {
                    var label  = DependencyComponent as Text;
                    label.font = _font;
                    label.text = label.text + " ";
                }
                OnFinishLoadDependencies(_font);
            });

            this.ResourceLoaders.Add(loader);
        }
Exemple #2
0
        protected void ProcessFont(string resPath)
        {
            var loader = FontLoader.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);
        }