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 阅读(216) 评论(0) 编辑 收藏 举报