Unity Package Creator
A downloadable tool for Windows, macOS, and Linux
The "Rugged Grump Package Creator" script is a utility script designed to simplify the process of creating Unity packages within the Unity Editor. A Unity package is a container that bundles together assets, scripts, scenes, and other resources into a single file, allowing for easy sharing, distribution, and reuse of content.
When the script is included in a Unity project, it adds a menu item under "Rugged Grump" in the Unity Editor's toolbar. By selecting the "Create Unity Package" option from this menu, users can initiate the package creation process.
Upon selecting the "Create Unity Package" option, the script performs the following steps:
- It retrieves the path of the currently selected folder within the Unity Editor, ensuring that a valid folder is selected.
- It extracts the name of the selected folder to use as the default name for the package file.
- The script prompts the user to specify the location and name for the package file using a file browser dialog. The chosen file path will be the destination for the created Unity package.
- The script then scans all asset paths within the project to determine which assets are located within the selected folder or its subfolders.
- It creates an array of asset paths that are contained within the selected folder, ensuring that only these assets are included in the package.
- Using the AssetDatabase.ExportPackage() method, the script generates the Unity package file at the specified location. It includes all the assets from the selected folder and its subfolders, maintaining the folder structure within the package.
- Upon successful package creation, the script logs a message in the Unity Editor's console, indicating the file path where the package is created.
By using this script, Unity developers can quickly and conveniently create Unity packages containing the desired assets, making it easier to share and distribute content with others or reuse assets in different projects. The script eliminates the need for manual asset selection and package creation, streamlining the workflow and improving productivity.
Download
Click download now to get access to the following files:
Development log
- Rugged Grump Unity Package CreatorMay 31, 2023
Leave a comment
Log in with itch.io to leave a comment.