Package2Folder [FREE]

Hey, guys!

I’m going to release on the Asset Store my open source script which allows you to import *.unitypackage into specified folder.

If you often need to import third-party packages, it’s a good idea to place them under “Plugins” folder to avoid recompilation with your regular scripts to save yourself some time. Some assets are not compatible with Plugins folder, so you might want to import them into “Third Party” folder in your project to avoid bloating project’s root anyways.

It’s really annoying Unity doesn’t have such functionality out-of-the-box, so I decided to make a simple script for that.

Currently the vey first version is available on the GitHub:

And I hope to see it soon on the UAS too.

I have some future plans on improving it, but all your suggestions, ideas and bug reports are welcomed, as always!
P.S. pull requests are very welcomed too! :slight_smile:

4 Likes

Does this take care of the issue of hard-coded paths in assets as well? At one point, whenever I was importing an asset I’d manually move it after it finished importing. But I ran into too many assets with hard-coded paths. :frowning:

Definitely sounds interesting though. I may give it a play sometime this week if I get a few minutes to take a breath… lol

Thanks for sharing!

1 Like

Hey, @BackwoodsGaming , thanks for your question and your interest!

No, it doesn’t touch imported files and not address issue with hardcoded paths.

Unfortunately, it’s nearly impossible to deal with it as paths may be constructed from different parts including non-static ones.

Actually, it’s a bad practice to use hardcoded paths and it should be addressed by assets devs themselves in first place, in ideal world.

BTW, I may add additional checks in future for the strictly top-level special folders which don’t work while nested.

1 Like

facing this error when trying to import a package using this tool

Console Message

ArgumentException: method arguments are incompatible
System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure, System.Boolean allowClosed) (at :0)
System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method) (at :0)
CodeStage.PackageToFolder.Package2Folder.get_ExtractAndPrepareAssetList () (at Assets/Plugins/CodeStage/Package2Folder/Scripts/Package2Folder.cs:54)
CodeStage.PackageToFolder.Package2Folder.ImportPackageToFolder (System.String packagePath, System.String selectedFolderPath, System.Boolean interactive) (at Assets/Plugins/CodeStage/Package2Folder/Scripts/Package2Folder.cs:151)
CodeStage.PackageToFolder.Package2Folder.Package2FolderCommand () (at Assets/Plugins/CodeStage/Package2Folder/Scripts/Package2Folder.cs:128)

Using Unity 2018.4.6f1 on windows 10, let me know if this version is not supported

1 Like

Thanks for reporting this problem!
I’ll look into and will fix it with next update.

1 Like

@Aseemy
I believe it’s fixed now and update should be shortly available in the store.

Meanwhile, feel free to grab it on GitHub:

1 Like

Wow, thanks for the quick fix. unfortunately i didnt get a notification. but i tried it now and its working perfectly.

1 Like

Hi i got this error by importing(Unity 2019.3.11f1:

ArgumentException: method argument length mismatch
System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure, System.Boolean allowClosed) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method) (at <437ba245d8404784b9fbab9b439ac908>:0)
CodeStage.PackageToFolder.Package2Folder.get_ExtractAndPrepareAssetList () (at Assets/Plugins/CodeStage/Package2Folder/Scripts/Package2Folder.cs:54)
CodeStage.PackageToFolder.Package2Folder.ImportPackageToFolder (System.String packagePath, System.String selectedFolderPath, System.Boolean interactive) (at Assets/Plugins/CodeStage/Package2Folder/Scripts/Package2Folder.cs:149)
CodeStage.PackageToFolder.Package2Folder.Package2FolderCommand () (at Assets/Plugins/CodeStage/Package2Folder/Scripts/Package2Folder.cs:128)

Hey @viktorkadza

Thank you for reporting this (got your email as well).

Internal API has changed (again), I’ll investigate and fix it with next update!

1 Like

Hey @viktorkadza ,

It should be fixed now on GitHub (and will appear on the store as well after review).

1 Like

Thanx.It works now!

1 Like