将scroll的位置设置在指定位置处,再设置clipOffset;
Vector3 pos=dayScroll.transform.localPosition;
pos.y=scrollPostion+originalPosy;
dayScroll.transform.localPosition=pos;
dayScroll.GetComponent<UIPanel>().clipOffset=new Vector2(0,-scrollPostion);
时间: 2024-10-13 16:48:57