Tags:

ActiveDen: Building a UnityPackage

Building a Unitypackage is a relatively painless experience that will help your customers integrate your code a lot more easily than a regular zipped project file. Unitypackage files automatically import and set up the correct files and folders into a Unity project, so there’s very little work on the part of the person importing. Remember, the folder hierarchy in your project will be same as how the Unitypackage will set it up in the buyer’s project.

  1. Open your project in Unity.
  2. Make sure your folders are set up correctly as explained here under Project Panel Organization.
  3. Select your actual scene file(s) and resources folder from the Project panel.
  4. Click Assets > Export Package.
  5. A new window should appear showing all of the gameobjects, scripts, and components that go together to make up your demo scene.
  6. If it is not already checked, check the box at the bottom of that window called Include dependencies.
  7. Click Export and give it a suitable name and save location.
  8. Hopefully, this should have created a nice neat little package containing everything a user would need to use your scripts, including your demo scene.
  9. Test the scene! Make a new blank project (you shouldn’t need any of the Standard Assets). Click the Assets drop down menu again (from the menu bar at the top of the editor window) and click Import Package. Find the package you just created and import it.

If all has gone well, Unity should import everything it needs to recreate your scene. All of your scripts should be in place along with any assets. If that’s the case, you’re good to go!

Rate this Article 1 Star2 Stars3 Stars4 Stars5 Stars (7 Ratings)
Help us improve the wiki Send Your Comments