Skip to main content

Packages

A package carries parts of one project into another: an enemy prefab with its model and sounds, a menu scene, a set of scripts, an event sheet. It is one .tgepkg file. Keep it as a library of your own parts, or send it to someone else. It works like Unity's Export Package and Import Package.

The Packages window​

File → Packages… (on a phone, ☰ menu → Packages) lists ready-made packages you can add to your project. It works like Unity's Package Manager.

The Packages window

  • Registry lists the packages anyone can install, with what each holds and how big it is. Search finds them by name, description or the names of their prefabs. Official packages are made by Tiny Game Engine from its templates and showcases.
  • Each package shows how many times it was downloaded (once per place, so updates don't count again) and how many people like it. Press the heart to like a package; you need to be signed in. Sort the list by Popular, Newest or Name.
  • Install downloads the package and opens the import list (see Import a package), so you see what comes in first.
  • When the registry has a newer version of a package in your project, its button says Update to with the new version. The update works like importing a newer package file: changed items are replaced and placed prefab copies follow.
  • In this project lists the packages the project has, with their versions. Remove takes out everything a package brought in. If you changed one of those items, your changes go too. Undo brings it all back.
  • Import from file… and Export… are the same as in the File menu.

Packages imported from a file are listed under In this project too, so they can be removed the same way.

Publish a package​

Anyone signed in can put a package in the registry for others to install.

  1. Open File → Export package… (on a phone, ☰ menu → Export package…).
  2. Fill in Name, Version and Description, and an Author name to show in the registry.
  3. Tick what goes in, as for exporting.
  4. Press Publish. You are asked to sign in first if you aren't.
  • The name belongs to the account that published it first. Nobody else can publish a package with that name.
  • A published version never changes. To change your package, publish it again with a higher version number. If the version is already published, the editor counts it up for you, from 1.0.0 to 1.0.1, so you can press Publish again.
  • Your packages are marked Yours in the Packages window. Unpublish takes the package and all its versions out of the registry. Projects that installed it keep what they have.
  • A free account can publish 5 packages, a Pro account 50, each up to 20 MB.

Report a package​

The flag button on a package someone else made reports it, with a reason. A package reported by three different people is taken out of the list until it is checked.

Editor scripts​

Editor scripts run inside the editor and can change your project. The Packages window shows how many a package has, and in the import list they come unticked, marked Editor script. Tick one only if you trust whoever made the package.

An editor script in the import list comes in unticked

Export a package​

  1. On a computer, open File → Export package…. On a phone, open the ☰ menu → Export package….
  2. Give the package a Name and a Version, and a Description if you like.
  3. Tick what goes in: scenes, prefabs, scripts, event sheets, files, materials, shaders, animators, timelines, data tables, post-processing profiles and render textures. All ticks a whole list.
  4. Press Export. The .tgepkg file is saved.

Exporting an event sheet: the prefabs and sounds it uses are ticked too

Include dependencies​

With Include dependencies on, everything the ticked items use goes in too. Those items are ticked and greyed, with the mark used:

  • a prefab brings its model, its materials and the textures they use;
  • a material brings its shader;
  • a scene brings its event sheet, its prefabs and its files;
  • an event sheet brings the prefabs it spawns, the sounds it plays, the data tables it reads and the global variables it uses;
  • a script brings the data tables, prefabs and timelines it names.

Turn it off to export only the items you ticked.

Import a package​

  1. Open the project to add the parts to.
  2. On a computer, open File → Import package…. On a phone, open the ☰ menu → Import package…. Then pick the .tgepkg file.
  3. A list shows what is in the package, and what importing will do with each item:
MarkMeaning
NewNot in this project yet: it is added.
UpdateIt came from this package before and the package has a newer version of it: it is replaced.
SameAlready here as it is in the package: it is left alone.
  1. Untick anything you don't want, then press Import. Undo takes the whole import back.

Importing: everything is new to this project

Updates​

Each item keeps its identity when it moves between projects, as in Unity. Say you export an enemy, import it into a game, then change the enemy and export the package again. Importing the new package marks the enemy Update and replaces it. Objects placed from the prefab follow, and nothing is added twice.

An item you renamed after importing it keeps your name when an update replaces it.

Names already taken​

A new item whose name is already used in its list comes in with a number: Main events becomes Main events 2. The arrow in the list shows the new name. Events that find things by name, such as Spawn object with Zombie, still find this project's own item of that name. Rename one of the two if the package's events should use theirs.

Good to know​

  • Files linked from the internet (library models) stay links. Every other file goes inside the package.
  • A package made with a newer version of the editor asks you to update the app. Older packages are brought up to date as they are imported.
  • The project's settings are not part of a package: on-screen controls, input keys, quality, the start scene. Set them in the new project.
  • To copy a whole project, use Backup project (.tge) instead (see Backup).