Beispiel #1
0
        /// <summary>
        /// 加载文本
        /// </summary>
        public static void LoadText(string address, Action <string> onComplete)
        {
            CResourceLoader loader = new CResourceLoader();

            loader.LoadObject <UnityEngine.Object>(address, o =>
            {
                if (o == null)
                {
                    Debug.LogWarning(address + "| is null");
                }
                onComplete(o.ToString());
            });
        }
Beispiel #2
0
        /// <summary>
        /// 加载ui用的sprite
        /// </summary>
        public static void LoadSprite(string address, Action <Sprite> onComplete)
        {
            CResourceLoader loader = new CResourceLoader();

            loader.LoadObject <Sprite>(address, onComplete);
        }