Exemple #1
0
 public static void SetImageSprite(Image image, string prefabPath, UIFormScript formScript, bool loadSync = true, bool needCached = false, bool unloadBelongedAssetBundleAfterLoaded = false, bool isShowSpecMatrial = false)
 {
     if (image == null)
     {
         return;
     }
     if (loadSync)
     {
         UIUtility.SetImageSprite(image, UIUtility.GetSpritePrefeb(prefabPath, needCached, unloadBelongedAssetBundleAfterLoaded), isShowSpecMatrial);
     }
     else
     {
         image.color = new Color(image.color.r, image.color.g, image.color.b, 0f);
         formScript.AddAsyncLoadedImage(image, prefabPath, needCached, unloadBelongedAssetBundleAfterLoaded, isShowSpecMatrial);
     }
 }