Unity 图片自动识别尺寸
StartCoroutine(LoadUnitDatas()); public IEnumerator LoadUnitDatas() { yield return new WaitForEndOfFrame(); myScorllRect.gameObject.SetActive(true); myScorllRect.content.GetComponent<Image>().sprite = scrollSpriet; myScorllRect.content.GetComponent<Image>().SetNativeSize(); }
posted on 2021-04-20 17:19 zqiang0803 阅读(226) 评论(0) 收藏 举报
浙公网安备 33010602011771号