LayoutRebuilder.ForceRebuildLayoutImmediate() 이 안먹히면 Canvas.ForceUpdateCanvases()
Unity 2024. 9. 27. 11:46728x90
LayoutRebuilder.ForceRebuildLayoutImmediate(Transform); 이 안먹힌다면
ForceRebuildLayoutImmediate에 전달된 오브젝트가 잘못되었거나, 레이아웃 관련 컴포넌트(LayoutGroup, RectTransform, ContentSizeFitter 등)가 없는게 아닌지 확인
아니면
Canvas.ForceUpdateCanvases(); // 캔버스 강제 업데이트 후
LayoutRebuilder.ForceRebuildLayoutImmediate(Transform); 실행.
728x90
'Unity' 카테고리의 다른 글
Unity 시뮬레이터 (0) | 2024.09.27 |
---|---|
SetIsOnWithoutNotify(bool isOn) toggle 의 이벤트를 호출하지않고 값 변경하기 (0) | 2024.09.27 |
ContentSizeFitter 적용 LayoutRebuilder.ForceRebuildLayoutImmediate (0) | 2024.09.26 |
RenderTexture.Create failed: width & height must be larger than 0UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (0) | 2024.09.20 |
GetComponent<TMP_Text>().ForceMeshUpdate() 이슈 (0) | 2024.08.02 |