Unity ContentSizeFitter 手动刷新

2021-04-29 18:26

阅读:296

标签:shc   contents   ref   bsp   build   transform   fresh   refresh   oid   

    public void RefreshContentSizeFitter()
    {
        ContentSizeFitter[] csfs = itemRoot.GetComponentsInChildren();
        foreach (var item in csfs)
        {
            LayoutRebuilder.ForceRebuildLayoutImmediate(item.GetComponent());
        }
    }

Unity ContentSizeFitter 手动刷新

标签:shc   contents   ref   bsp   build   transform   fresh   refresh   oid   

原文地址:https://www.cnblogs.com/3dunity/p/13231761.html


评论


亲,登录后才可以留言!