Skip to content

Packages

Balancy has packages/templates system similar to same systems on other platforms (e.g. Unity packages system). It allows you to install existing public packages and templates made by our team.

The most known and used public package is LiveOps package. It allows you to use additional features like segmentation, A/B Tests, game events, etc.

Private Packages

You can create your own private packages to use them in your projects. Open packages page and press "Configure packages".

Package config

After that create a new one.

One project one package

Currently one project can have only one private package for export. So if you are planning to create several private packages, do it in separate projects.

In the right corner chose "Private" and "Default".

Package settings

Now you can choose, which parts of this game are going to this package. You can pick templates and their docs, enums.

Package items

For templates, you can choose documents to include to this package. For example, you want to include some basic items, which will be used in all your games.

Package template docs

Some things to keep in mind:

  1. When you pick templates, don't forget to choose all related templates. In our example Item template has param of Position type. To work as intended you have to select Position template also.
  2. Pay attention to template flags. Static on clone specifically. If this flag is set, the template, and it's params will be updated/replaced on each package update in target game where you install this package.
  3. When you include template documents keep in mind that they will be installed only once. If you make an update in these docs and publish new package version, when you update this package in a target game, those changes will be not applied.
  4. If you include document, but after package installation delete it in a target game, this document will be added again on next package update.

Don't forget to press save after changes made. When you are ready, press publish to release a new package version. Now you are able to install/update this package in your other games.

Package Installation

In your other games you will see this package in the list and be able to install.

Packages list

After installation selected templates and documents will be installed into your game.

Installed package

Dependencies

In some cases you want to use or depend on items from another packages. Typical use case: basic segments, which you want to use in all your games.

In this case you can choose LiveOps (or other packages) in the Dependencies section.

Package dependencies

If so, you will have to install those dependencies in your games before installing the package.

Fake Items

Sometimes you want to use documents from dependent package (e.g. LiveOps), but don't want to include them to package, you want to replace them with existing items.

Use case:

  1. In your package you have template Item, and it has document param of StoreItem template.
  2. You create Store Item in document. Store item
  3. You create Item template document and choose this store item. Item with store item param
  4. You don't want to include this store item into the package. Instead, you want to set it as fake and replace it with your existing store item from target game. Fake item
  5. In your game (where you want to install this package to) you already have store items. You don't want to add new. So, on package installation you can replace those "fake" items with documents from the game. Replace fake item
  6. After replacement and installation document will be imported, but reference to store item will be replaced with document from this game and no store items from the package will be added. Replace fake item

LiveOps Package

You can use LiveOps package as a dependency. In this case you will be able to include your own script into the package. For example, it's very useful to add some common Scripts to share between your own projects.

You can select Scripts by clicking Items button opposite to LiveOps dependency.

LiveOps package items

In the opened modal window chose your Scripts.

LiveOps package items

Pay attention to Scripts flags. By default, there are no flags selected. This means, that your Script will be installed once, and will not be updated if you install new package version with changed Scripts.

If you need your Script to be updated with package update, set Static On Clone flag.

Script flags

When you update package in your project, all Scripts with Static On Clone flag set will be replaced with a new version. All you changes in these scripts will be lost. We recommend you to set this flag only for common scripts, which should be in sync among all projects.

You probably are going to use references to another items from your project: templates, documents (when you use Activate Offer Node), Smart Objects (when you use Wait User Property node). Don't forget to include all these items into the package.

Unlinking Packages

You can unlink package from your project. In this case all resources, templates, documents and other items will be detached from package and package itself will be removed from the installed packages list.

When you do this, you will be able to include unlinked items into your own (other) private package.

If you install unlinked package again all package items will be added to the project again.

Unlink with caution

Unlink operation is irreversible. Make 100% sure what you are doing!

Deleting Packages

You can delete package from your project. In this case all resources, templates, documents and other items will be deleted and the package itself will be removed from the installed packages list.