Multiple asset packs containing the same files.

Hello,

I’ve been fiddling around with an idea to create some Unity UI skins. I’d also like to include some scripts so that the users have a professionally written UI layer that will just work out of the box.

Now, the problem is that since I’d like them all to contain the same scripts if a user were to import more than 2 packages, it would lead to duplicated scripts.

Is there any way to avoid such a problem? Could the files be somehow marked as possibly duplicated so that they are not imported twice? Or maybe always keep the more recent versions?

Thanks

Scripts are not included in asset bundles, only references to the script via UID. All scripts must already exist in the application itself.

Textures and meshes can be duplicated across asset bundles, but unity will only ever load one copy of it at a time.

Well, afaik scripts can be added in asset bundles but my question was about asset store packs.

You could have a comon folder Structure for all your packages.

MyPackageFamilyName
----Scripts
----ComonData
----DataAsset1
----DataAsset2

That way you can include the scripts in a general folder without collision problems.

That does sound like a good idea. Would that still comply with the asset store standards of submitting packages? I even have more things like a tile based terrain editor that I would like to polish and submit in the future which would still use some common codebase (you know, like some GUI utilities, a custom scriptable object etc).

From the assetstore submission guidlines

https://unity3d.com/de/asset-store/sell-assets/submission-guidelines

I’ve read that a while before and so far all my packages have been submitted with the package name as the root folder since they are art assets and this problem was not present. Thank you very much for your help!