home, UNITY, updated

Force Immediate Layout Update in Unity?

You can update the layout of any game object by using an Immediate layout update like this

UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate
(gameObject.transform.GetComponent());


// here gameObject is current game object. You can use this code for the other game objects. It will automatically apply to child game objects and parent game objects.

Related Articles

post a comment