Loading Leap…

Creating Groups

Create groups from the project tree, add elements to them, and see how they change runtime paths.

Creating Groups

Groups organise your elements into namespaces. Your game addresses an element inside a group by the group's slug followed by the element's slug — daily_rewards.gold — and a group can contain other groups. You create and manage groups from the project tree on the Design tab.

Creating a Group

In a workspace, hover the row in the project tree that the group should go in — Player for the top level, or an existing group to nest it — click + (on Player it's always visible) and choose Group. Leap creates the group straight away as "Group 1" inside that row and opens it in the Inspector. Name it — e.g. "Daily Rewards", with the slug daily_rewards — and click Save.

Groups don't have a tab in the Element Explorer; you find and open them in the project tree. A group has the fields every element shares — see Navigating Leap Studio — with two differences:

  • Slug — the group's part of every path inside it. Group slugs must be unique across the whole project.
  • The group field below Tags — the group this group sits in. Moving a group moves everything inside it, and Leap tells you how many members and nested groups will move before it does.

Adding Members

The Members section lists the elements in the group, each with the path your game will use to reach it. A new group reads "No members yet — pick elements below to bring them into this group."

  • To add an element, pick it in Add element to this group…. If it's in another group, Leap asks before moving it.
  • To take an element out, click the remove button on its row. The element keeps existing — it just moves out of the group.

Saving the group also updates every element you added or removed. You can also put an element in a group from the element's own Inspector, using the group field below its Tags.

How Groups Change Paths

Your game reaches an element by its slug, prefixed with the slug of every group it sits in:

  • gold — a resource at the top level
  • daily_rewards.gold — the same resource inside the Daily Rewards group

Important: Moving an element into or out of a group changes the path your game uses to reach it. Leap shows you the old and new path and asks you to confirm — game clients that still use the old path will break.

Deleting a Group

Open the group in the Inspector and click Delete in its header. The group's members and any groups inside it aren't deleted: they move up into the group above it, or to the top level. Leap tells you how many elements will move before you confirm, because every path below the group changes.

Next Steps

Continue to Organizing Your Project to learn about folders and which elements can use which.