public bool LoadFontAsync(UIFont obj, string fileName, int loadPriority = 0) { if (obj == null || string.IsNullOrEmpty(fileName)) { return(false); } var mgr = BaseResLoaderAsyncMgr.GetInstance(); if (mgr != null) { ulong id; int rk = ReMake(fileName, obj, BaseResLoaderAsyncType.NGUIUIFontFont, false, out id); if (rk < 0) { return(false); } if (rk == 0) { return(true); } return(mgr.LoadFontAsync(fileName, this, id, loadPriority)); } return(false); }
public bool LoadShaderAsync(UI2DSprite uiSprite, string fileName, int loadPriority = 0) { if (uiSprite == null || string.IsNullOrEmpty(fileName)) { return(false); } var mgr = BaseResLoaderAsyncMgr.GetInstance(); if (mgr != null) { ulong id; int rk = ReMake(fileName, uiSprite, BaseResLoaderAsyncType.UI2DSpriteShader, false, out id); if (rk < 0) { return(false); } if (rk == 0) { return(true); } return(mgr.LoadShaderAsync(fileName, this, id, loadPriority)); } return(false); }