Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
 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);
     }
 }