Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Hover Layout Arc" doesn't spread child GameObjects but keeps them piled on top of each other #81

Open
lehtiniemi opened this issue Mar 25, 2019 · 2 comments
Assignees
Labels

Comments

@lehtiniemi
Copy link

lehtiniemi commented Mar 25, 2019

Hi! I'm trying to create a circular UI around the hand with Leap Motion rig.

Using the "Hover Layout Rect Row", everything works fine, but it's not naturally circular. When I try to switch to Hover Layout Arc Row (or Stack), all the GameObjects remain piled in the same position and are not spread in any way. No matter what parameters I change in the arc row script, the objects remain in same position on top of each other. Changing "Starting degree" and some other parameters seem to rotate the objects, but they are still piled in one position. The child objects have Hover Shape Arc -script.

Am I using it wrong or is there some issue?

Unity 2018.2.2, Leap Motion Orion 4.4, Windows 10

@lehtiniemi lehtiniemi changed the title ARC layout doesn't seem to move the items within "Hover Layout Arc" doesn't spread child GameObjects but keeps them piled on top of each other Mar 25, 2019
@zachkinstner
Copy link
Member

Hi @lehtiniemi, thanks for checking out Hover UI Kit!

The "arc" layouts are built to work with arc-shaped items -- they won't be able to find and reposition any rect-shaped items. To switch from "rect" to "arc", you'll need to:

  • Replace each item's HoverShapeRect component with HoverShapeArc.
  • Replace each item's rect-shaped renderer with an arc-shaped one. (On the item's HoverItemRendererUpdater component, change the "Button Renderer Prefab" property to, for example, the "HoverAlphaButtonArcRenderer-Default" prefab.)

To see this in action, take a look at the demo scenes (the "Layouts-NestedArcAndRect" scene contains many examples). It may also be helpful to review the Layouts wiki page, specifically the Arc-Shaped Layouts section.

@zachkinstner zachkinstner self-assigned this Mar 25, 2019
@lehtiniemi
Copy link
Author

Thanks, now I got it to work. The button renderer prefab was the missing piece.

As a sidenote, it didn't work when I changed the prefabs onto built checkboxes. I got some console errors and the buttons didn't appear. Instead, I had to recreate the checkboxes with the builder and choose the prefabs at build stage. Then they rendered properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants