Created
January 27, 2023 05:52
-
-
Save irfanbaysal/200ec420d3e8e0408b741bd0777c025e to your computer and use it in GitHub Desktop.
Rect Transform Sibling Update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async UniTask UpdateSibling(int siblingIndex) | |
{ | |
RectTransform.SetSiblingIndex(siblingIndex); | |
await UniTask.Yield(cancellationToken: this.GetCancellationTokenOnDestroy()); | |
LayoutRebuilder.ForceRebuildLayoutImmediate(RectTransform); | |
Canvas.ForceUpdateCanvases(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment