Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Undocumented breaking API change - LayoutGroup.SetChildAlongAxis

Discussion in '2019.1 Beta' started by Simie, Feb 16, 2019.

  1. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    There has been a breaking change in the
    UnityEngine.UI.LayoutGroup
    base class.

    In 2018.3 this method had the signature:
    protected void SetChildAlongAxis(RectTransform rect, int axis, float pos, float size)


    In 2019.1b3 this method has two overloads with these signatures:
    protected void SetChildAlongAxis(RectTransform rect, int axis, float scaleFactor, float pos)
    protected void SetChildAlongAxis(RectTransform rect, int axis, float scaleFactor, float pos, float size)


    All existing uses of this method in 3rd party code have been broken by the introduction of the new "scaleFactor" parameter in the middle of the parameter list. Ideally the new parameter would be placed at the end of the parameer list and default to a value that maintains the existing behaviour of this method.

    I couldn't see any mention of this change in the release notes for 2019.1
     
    LeonhardP and charlesb_rm like this.
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Thanks for bringing this to our attention! For future references, please submit a bug report for bugs that you're experiencing before posting about them on the forum.
     
  3. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Thats also please report a bug for this issue so it can be tracked properly.
     
  4. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Will this require a repro or will the description in my post suffice? I'd have to actually create a repro project to demo this issue.
     
  5. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Description should be just fine in this case. Please post the case here when you can
     
  6. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Case #1129157
     
    LeonhardP likes this.
  7. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Thanks will get it corrected.