protected void loadAtlasAsync(string atlasName, AtlasLoadDone callback, object userData, bool errorIfNull = true) { if (!mSpriteNameList.ContainsKey(atlasName)) { object[] userDatas = new object[] { callback, userData }; mResourceManager.loadSubResourceAsync <Sprite>(atlasName, onAssetLoadDone, userDatas, errorIfNull); } }
//--------------------------------------------------------------------------------------------------------------- // 异步加载图集 protected void loadAtlasAsync(string atlasName, AtlasLoadDone callback, object userData, bool errorIfNull = true) { if (!mSpriteNameList.ContainsKey(atlasName)) { var param = new AtlasLoadParam() { mCallback = callback, mUserData = userData }; mResourceManager.loadSubResourceAsync <Sprite>(atlasName, mAtlasCallback, param, errorIfNull); } }
public void getAtlasAsync(string atlasName, AtlasLoadDone callback, object userData, bool errorInNull, bool loadIfNull) { if (mAtlasNameList.TryGetValue(atlasName, out UGUIAtlas atlas)) { callback?.Invoke(atlas, userData); return; } if (loadIfNull) { loadAtlasAsync(atlasName, callback, userData, errorInNull); } }
public void getAtlasAsync(string atlasName, AtlasLoadDone callback, object userData, bool errorInNull, bool loadIfNull) { if (mAtlasNameList.ContainsKey(atlasName)) { callback?.Invoke(mAtlasNameList[atlasName] as Texture2D, userData); return; } if (!mAtlasNameList.ContainsKey(atlasName) && loadIfNull) { loadAtlasAsync(atlasName, callback, userData, errorInNull); } }
public override void resetProperty() { base.resetProperty(); mCallback = null; mUserData = null; }