Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Better UI

Discussion in 'Assets and Asset Store' started by Hosnkobf, Jan 30, 2017.

  1. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,050
    What you could try as a workaround is writing a manager class that has a reference to a Better Axis Aligned Layout Group Prefab and has one attached to itself. When you add the first element using this manager class, it will instantiate the referenced prefab as a child and puts the element as child of that layout group. The manager stores that layout group as "active".
    Whenever another element is added, the manager checks if it fits into the active layout group. If not, it creates another instance from the prefab, puts the object inside there and sets that new layout group as "active".
     
  2. Heurazio

    Heurazio

    Joined:
    Dec 24, 2021
    Posts:
    5
    Had the same problem with Unity 2021.3.8f1. Also, it seems BetterUI has some problems if it is not in the Asset root. I placed it in a Folder "3Party" which seems to be a problem. Furthermore, it always creates a folder "TheraBytes" again at the Asset Root which is not so lovely. Anyway to resolve this problem so that stuff stays inside the folder or that I change paths?
     
  3. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,050
    Yes, other paths are not supported out of the box. But you can adjust paths manually, see here.
    Note that it will make updates more difficult if you use a different root path.
     
  4. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    486
    Hi

    I have a Better Axis Aligned Layout Group with a Landscape and Portrait Setting like so:

    upload_2023-1-11_15-11-12.png

    This works great in the Editor/Device Simulator but on the iPhone Build it stays in the Portrait setting. Do you have any idea what the cause could be for this?

    Thank you!
     
  5. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,050
    iddqd likes this.
  6. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    486
    Great, thanks for the quick solution. It all works perfectly now. Made my day a lot better!
     
    Hosnkobf likes this.
  7. capirot

    capirot

    Joined:
    May 2, 2013
    Posts:
    1
    Hello!
    I would like to know if I am able to control individual cell size in the same grid. I want to achieve something like this:

    upload_2023-1-19_0-57-24.png

    Thank you! And congratulations for the asset!
     
  8. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,050
    Unfortunately, this is not supported. This would need a completely new layout group component.
    However, if your elements are not created during runtime, you can set it up without any layout group just by using anchors.