Preventing duplicate assets in Crayta packages

When publishing packages on Crayta, you will undoubtably run into a situation where assets from a package dependency are ending up in your own package.

Avoiding this is fairly simple, if you know what to look for.

The key to avoiding this is to ensure you haven’t modified any of the package dependencies before publishing your package. This goes for creating and updating a package.

To quickly tell if you’ve modified a package dependency:

  • Go to the package publish/update screen
  • Right click the top element and click “Remove”, followed by “Cancel”
  • This will reveal the status icons in your asset list

  • Next, click on the two checkboxes at the bottom of the dialog to display all assets

  • Your screen should look something like this

  • These icons indicate files you own have changed:

  • These icons indicates files from a package have changed:

At this point, if I published this package, I would end up with duplicates of questScript and userQuestsScript.

Since these assets come from the Quest System package, and I’m also the author, the solution is to update the Quest System package first. This will “commit” the modifications to the Quest System package, and they will no longer be considered modified by the crayta packaging system.

If you do not own the modified package, you have 2 options:

  • Revert the changes to the package dependencies. It’s possible you simply opened a file by accident, and that’s enough for crayta to believe its been modified. To revert, simply right click the asset right in the package window and click on “Revert”

  • The other option is that you’ve intentionally modified a package dependency. Maybe you’ve extended a package with custom functionality. In that case, you do want to include the new script in your package. You will need to be very clear in your package guide that the user must use your customized version of the script, rather than the version from the dependency package.