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.
You can create your own private packages to use them in your projects. Open packages page and press "Configure packages".
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".
Now you can choose, which parts of this game are going to this package. You can pick templates and their docs, enums.
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.
Some things to keep in mind:
- 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.
- 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.
- 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.
- 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.
In your other games you will see this package in the list and be able to install.
After installation selected templates and documents will be installed into your game.
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.
If so, you will have to install those dependencies in your games before installing the package.
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.
- In your package you have template Item, and it has document param of StoreItem template.
- You create Store Item in document.
- You create Item template document and choose this store item.
- 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.
- 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.
- 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.
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.
In the opened modal window chose your Scripts.
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.
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.
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!
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.