コード例 #1
0
 public static void SetImageSprite(Image image, string prefabPath, CUIFormScript formScript, bool loadSync = true, bool needCached = false, bool unloadBelongedAssetBundleAfterLoaded = false)
 {
     if (image != null)
     {
         if (loadSync)
         {
             SetImageSprite(image, GetSpritePrefeb(prefabPath, needCached, unloadBelongedAssetBundleAfterLoaded));
         }
         else
         {
             image.color = new Color(image.color.r, image.color.g, image.color.b, 0f);
             formScript.AddASyncLoadedImage(image, prefabPath, needCached, unloadBelongedAssetBundleAfterLoaded);
         }
     }
 }
コード例 #2
0
 public static void SetImageSprite(Image image, string prefabPath, CUIFormScript formScript, bool loadSync = true, bool needCached = false, bool unloadBelongedAssetBundleAfterLoaded = false, bool isShowSpecMatrial = false)
 {
     if (image == null)
     {
         return;
     }
     if (loadSync)
     {
         CUIUtility.SetImageSprite(image, CUIUtility.GetSpritePrefeb(prefabPath, needCached, unloadBelongedAssetBundleAfterLoaded), isShowSpecMatrial);
     }
     else
     {
         image.set_color(new Color(image.get_color().r, image.get_color().g, image.get_color().b, 0f));
         formScript.AddASyncLoadedImage(image, prefabPath, needCached, unloadBelongedAssetBundleAfterLoaded, isShowSpecMatrial);
     }
 }