public static void SetGenderImageSprite(Image image, byte bGender) { if (bGender == 1) { CUIUtility.SetImageSprite(image, string.Format("{0}icon/Ico_boy.prefab", "UGUI/Sprite/Dynamic/"), null, true, false, false, false); } else if (bGender == 2) { CUIUtility.SetImageSprite(image, string.Format("{0}icon/Ico_girl.prefab", "UGUI/Sprite/Dynamic/"), null, true, false, false, false); } }
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.color = new Color(image.color.r, image.color.g, image.color.b, 0f); formScript.AddASyncLoadedImage(image, prefabPath, needCached, unloadBelongedAssetBundleAfterLoaded, isShowSpecMatrial); } }
public static void SetSprite(this Image image, string prefabPath, CUIFormScript formScript, bool loadSync = true, bool needCached = false, bool unloadBelongedAssetBundleAfterLoaded = false) { CUIUtility.SetImageSprite(image, prefabPath, formScript, loadSync, needCached, unloadBelongedAssetBundleAfterLoaded); }
public static void SetSprite(this Image image, Image targetImage) { CUIUtility.SetImageSprite(image, targetImage); }
public static void SetSprite(this Image image, GameObject prefab) { CUIUtility.SetImageSprite(image, prefab); }
public static void SetSprite(this Image image, GameObject prefab, bool isShowSpecMatrial = false) { CUIUtility.SetImageSprite(image, prefab, isShowSpecMatrial); }