void Start()
    {
        layoutGroup = GetComponent <HorizontalOrVerticalLayoutGroup>();
        vertical    = layoutGroup.GetType() == typeof(VerticalLayoutGroup);
        horizontal  = layoutGroup.GetType() == typeof(HorizontalLayoutGroup);

        SetNavigation();
    }
Пример #2
0
    public static void SetChildControlWidth(this HorizontalOrVerticalLayoutGroup group, bool value)
    {
        if (pi_childControlWidth == null)
        {
            pi_childControlWidth = group.GetType().GetProperty("childControlWidth");
        }

        pi_childControlWidth?.SetValue(group, value, null);
    }