Search Unity

[RELEASED] RH Package Importer - Install Asset Store packages easily

Discussion in 'Assets and Asset Store' started by Rotary-Heart, May 13, 2018.

  1. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    RH Package Importer

    CoverImage_1950x1300.png

    Website: RotaryHeart.com
    Product Wiki: Under Construction

    Version 2.0.3

    Available Now: Asset Store
    Release Notes


    This system allows you to:
    • Easily install any downloaded store package without the need of opening the Asset Store.
    • Check for updates and even open the Store to download an update.
    • Share any Unity package across multiple different Unity projects (that are built with the same Unity version) without copy and pasting.
    • Easily upgrade or downgrade installed asset store packages.
    • It has complete integration for Windows, Mac and Linux.

    Shared packages are installed into the project using directory links. By using shared packages, you can have multiple Unity projects all using the same package folder, without needing to copy and paste each package per project. You can modify a file on a shared package and that change will be applied to all other projects that are using it. While directory link can be useful there are a couple of things to take into consideration before using them.
    1. Relocating a project might not work
      1. If you move a project the directory link might be lost. So instead you will end up with an empty folder. This can be fixed by deleting the empty folders and within the system re installing the package to the project as shared.
    2. Different Unity versions
      1. You need to be careful to not use the same shared package with different Unity versions. This might cause issues when re importing the package. The system installs the shared packages into a folder based on the Unity version to try to prevent this, but if you upgrade a project this might cause issues.
    3. They are installed into a subdirectory on your project, this might cause issues with packages that are using a hard coded path or that need to be on the root of your Assets folder.

    IMPORTANT NOTE: Even though it allows you to changes the installation location it doesn't change any hard-coded path inside the package. Use with precaution.
     
    Last edited: Apr 16, 2020
  2. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Great news version 1.0 has been accepted and it can be purchased at the Asset Store for $20.00 USD!! Asset Store Link

    Capture.PNG
     
    Last edited: Jun 28, 2018
  3. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Can you tell me a little more about this? The description doesn't give a lot of details but I think this might be what I could use. I have a lot of assets and need something to organize them. Also, what does it mean by it changes the location?
     
  4. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Sure, this asset is not for managing your installed packages. The list of packages you see on the screenshot is the downloaded packages from the asset store located on the computer. They are organized based on the package category (that is what you can select from the dropdown).

    What it means is that it allows you to change the installation location of the package. So let's say that you have a folder called 3rd Party where you have all your downloaded assets. You can use this window to make the Unity default package importer import the package directly to that folder.
     
  5. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Ok thanks, I was looking for something to help organize my purchased assets.

    I had started to make my own asset at one point to do this but had to set it aside to finish other things. If you don't mind me asking, what did you use to open and read the package files?
     
  6. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    So you want to be able to reorganize the files downloaded on a different folder?

    What you mean read the package file?
     
  7. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    No, I want the packages to stay where Unity downloaded them but I want to be able to setup categories, be able to search for things, assign key words, etc.. I want to be able to quickly find an asset, click a button, and then have it imported into a project.

    Your screenshots show package information such as the Unity version, the publisher, and the packages icon. Those are stored in the package file which is a zipped tar archive if I remember correctly. You have to read it to get those out and I was curious what you used to read the archive.
     
  8. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Alright now I got what you meant, sorry for the confusions. Yeah those are part of the future plans for this assets. As for the initial release you can't organize them. You can only use the store category to organize them, but that will be added soon.

    As for your question I'm just reading the zip file text data. I don't have any image from it, that screenshot is the default unity package importer.
     
  9. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Ok, I see. Yea, that's what I did initially. You can get some basic info out with a little effort but getting the package image and other details requires opening and reading the archive. There are some other assets on the store that do this and one I know uses Sharp Compress. That's where it got a little complicated and why I put this on the back burner. When I saw yours, I thought if it did what I needed I wouldn't need to finish mine :)
     
  10. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Version 1.2 is coming soon. There has been a couple of changes and now categories can be created for packages even if they are not from the asset store.

    List of changes
    • Fixed filter bug where it was showing the wrong packages.
    • New .ini file system used to save packages data (version, title, path, etc) The .ini file can be found at your project settings folder.
    • Non Asset Store packages can now be added to the list. They will be saved even if the actual package is deleted (you will not be able to import it since the system will fail to locate the package, but you will still see the asset data)
    • Categories can be modified even for Store packages. This is now a text field where you can type the category you want. You can also use / to include dropdown sections.
    • Couple of minor editor window bug fixes.
    None of the changes are applied to the .unitypackage or any other file. They are saved on the .ini file only. The system will not move or relocate any file/folder from the Asset Store or from custom pacakges.

    Editor window modified to be able to modify category for Asset Store packages and to modify all the data for custom packages.

    Capture.PNG
    Capture1.PNG
     
  11. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Version 1.1 has been submitted to the asset store for review. This version includes:
    • Fixed filter bug where it was showing the wrong packages.
    • New .ini file system used to save packages data (version, title, path, etc) The .ini file can be found at your project settings folder.
    • Non Asset Store packages can now be added to the list. They will be saved even if the actual package is deleted (you will not be able to import it since the system will fail to locate the package, but you will still see the asset data)
    • Categories can be modified even for Store packages. This is now a text field where you can type the category you want. You can also use / to include dropdown sections.
    • Couple of minor editor window bug fixes.
     
  12. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Version 1.1 is now live on the asset store!
     
  13. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    It sounds like this might be close to what I'm looking for at this point. Can you tell me how it gets the package list? I have a lot of packages and I was wondering if it reads the Unity asset folder and pre-populates the list or if you have to manually add the packages.
     
  14. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Yes it reads the Unity asset folder and populates the list from there. I am only missing the implementation for mac since I don't have a mac system to test. The custom packages are the only ones that need to be added manually.
     
  15. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Sounds good. I just picked up and will see how it does.
     
  16. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Awesome, thanks. I have more huge changes coming with this asset. I will post and update about them soon.
     
    reggie_sgs likes this.
  17. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Just tried it out and noticed a few issues. First, when I open the window, nothing shows up under the Asset Store tab until I click Custom and then click Asset Store tab again. The second issue is the bigger one. It seems that there is a hard coded limit to the number of assets. I was trying to install one that started with a "V" and couldn't find it in it's category so I switched to "Any" and scrolled down but saw the list stopped around assets beginning with "S". Also, it would be really useful to have a search option somehow. One other thing is it seems like it reloads the list every time you open it. I would much rather it only do that if the asset list is empty or we choose to refresh by pressing a button. When you have a large amount of assets, you really don't want to wait for it to check for new ones every time you open it to install something.

    It looks promising though and I hope these issues can be worked out.
     
  18. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Alright I will get to work with it not loading when you open it.

    That's odd, it doesn't let you scroll because the scroll bar is not big enough?

    Both the refresh button and the search bar are being implemented right now.
     
    reggie_sgs likes this.
  19. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Version 1.2 has been submitted to the asset store for review. This version includes:
    • Changed the way the system loads the Editor assembly. This fixes crash error on Unity 2018.
    • Mac support has been implemented. Now the system can populate Mac asset store packages.
    • Included new dialog that is displayed when a package is imported without using the system.
    • Re design the editor window to be more user friendly.
    • Included multiple options for the packages like backup, update, check for update, etc.
    • Modified the system to use a database for saving the data instead of a .ini file.
    • Included search bar.
    • Now the database only gets populated when clicking the refresh button.
    This is the first update that is starting to prepare the system for a huge version 2.0 update. More information to come soon.
     
    reggie_sgs likes this.
  20. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    One thing I just realized that would be a great addition is if you can have it do an update of a a package. I don't know if this is feasible but this would be a big plus. Right now I have to use the slow asset store window to search for and then update a package when a new version is released.
     
  21. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Version 1.1 is now live on the asset store!

    While the system can't do updates by itself since to be able to you need to login into your Unity account, the new menu does have an update option that will automatically open that package page on the editor asset store. So all you will need to do is click the store update button when the page finishes loading.

    Capture.PNG
     
  22. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Perfect! Looking forward to the update.
     
  23. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    That update should be live on the Asset Store already
     
  24. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Thanks I didn't get the update message. I just updated and now it no longer works. When I open the window, it's just blank and I continuously get the following error message. I tried completely removing and reinstalling but the same thing happens. I'm using 2017.4.3f1.

    DirectoryNotFoundException: Could not find a part of the path "C:\Users\Admin\Documents\RH Import Manager\Packages.db".
    System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:292)
    System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
    (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int)
    System.IO.File.Create (System.String path, Int32 bufferSize) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:135)
    System.IO.File.Create (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:130)
    RotaryHeart.Lib.PackageImporter.ImporterWindow.get_Connection () (at Assets/Asset_Tools/RHPackageImporter/Editor/ImporterWindow.cs:27)
    RotaryHeart.Lib.PackageImporter.ImporterWindow.OnGUI () (at Assets/Asset_Tools/RHPackageImporter/Editor/ImporterWindow.cs:62)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288)
    UnityEditor.HostView.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:107)
    UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:182)
     
  25. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Sorry about that, I forgot to include the code for creating the directory.

    If you go to Edit > Preferences > RHIM and change the paths to use an existing directory on your computer you will be able to use the system. I will include a quick fix for that right now.
     
  26. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Version 1.2.1 has been submitted to the asset store for review. This version includes:
    • Fixed bug where the system fails to create the database on a missing directory.
    • Fixed bug where the preferences window toggle were saving the wrong value.
     
  27. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Thanks. I went into the preferences and selected a folder for both of the paths and when I opened the window, there was a message "Nothing has been added to the database". Under tools, there was a refresh option so I chose that but get the error below. I'm assuming the "refresh" option is what you choose to preload all your assets into the database. If that's the case, I would suggest changing that message to let the user know to choose that if this is their first time running it. Another option I would suggest is popping up a window and prompting the user to do a refresh if it detects the database is empty.

    Thanks,
    Reggie

    ArgumentException: JSON parse error: The document root must not follow by other values.
    UnityEngine.JsonUtility.FromJson[PackageInformation] (System.String json) (at C:/buildslave/unity/build/artifacts/generated/common/modules/JSONSerialize/JsonUtilityBindings.gen.cs:25)
    RotaryHeart.Lib.PackageImporter.PackagesSection.GetPackageInfo (System.String path) (at Assets/Asset_Tools/RHPackageImporter/Editor/PackagesSection.cs:150)
    RotaryHeart.Lib.PackageImporter.PackagesSection.get_StorePackages () (at Assets/Asset_Tools/RHPackageImporter/Editor/PackagesSection.cs:126)
    RotaryHeart.Lib.PackageImporter.PackagesSection.PopulateFromStore () (at Assets/Asset_Tools/RHPackageImporter/Editor/PackagesSection.cs:635)
    RotaryHeart.Lib.PackageImporter.PackagesSection.<PopulatePackages>m__3 () (at Assets/Asset_Tools/RHPackageImporter/Editor/PackagesSection.cs:383)
    UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, Int32 selected) (at C:/buildslave/unity/build/artifacts/generated/common/editor/GenericMenuBindings.gen.cs:121)
     
  28. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    This issue has been resolved via private message. An update with the changes made will be published right away.
     
  29. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Version 1.2.2 has been submitted to the asset store for review. This version includes:
    • Fixed bug where package names could throw illegal path exception.
    • Fixed bug where some assets could have the wrong data on the package and couldn't be loaded.
     
  30. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Version 1.2.2 is now live on the asset store!
     
  31. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Version 2.0 has been submitted to the asset store for review. This version includes:
    • System has been changed to be more of a package manager.
    • Install packages as shared.
    • Keep track of installed packages on your project. (Only applicable if installed using the system.
    With this update the price will be going up to $20.00 USD

    Current users, keep in mind that for the new update to work you need to delete the old database. This will be the only time that this is required.
     
    Last edited: Jun 26, 2018
  32. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    What do you mean about downloading the old database?
     
    Rotary-Heart likes this.
  33. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Sorry about that I meant delete the old database, I have no idea why I typed download. Thanks for spotting that out.
     
  34. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Gotcha. Where does it store the database file?
     
  35. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Open up the preferences window, there you can see the path the system is currently using for the database.
     
    reggie_sgs likes this.
  36. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Version 2.0.1 has been submitted to the asset store for review. This version includes:
    • Fixed wrong path for shared packages and project database.
     
  37. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Version 2.0.1 is now live on the asset store!
     
  38. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Just updated, deleted the old database, and did a refresh and now it constantly logs the following error and won't run.

    Hope you can fix this quickly as I hate to be without the system.

    ArgumentException: Illegal characters in path.
    System.IO.Path.Combine (System.String path1, System.String path2) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Path.cs:127)
    RotaryHeart.Lib.PackageImporter.PackagesSection.PopulatePackages () (at Assets/Asset_Tools/RHPackageImporter/Editor/PackagesSection.cs:565)
    RotaryHeart.Lib.PackageImporter.PackagesSection.DrawSection () (at Assets/Asset_Tools/RHPackageImporter/Editor/PackagesSection.cs:247)
    RotaryHeart.Lib.PackageImporter.ImporterWindow.OnGUI () (at Assets/Asset_Tools/RHPackageImporter/Editor/ImporterWindow.cs:130)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288)
    UnityEditor.HostView.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:107)
    UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:182)
     
  39. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Sorry about that, I keep forgetting that some packages may contain illegal characters, here's the fix go to PackagesSection.cs line 565 and replace it with the following:

    string myBackup = Path.Combine(backupPath, ImporterWindow.RemoveSpecialCharacters(data.Title));

    I'll push a quick patch with this fix.
     
  40. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Version 2.0.2 has been submitted to the asset store for review. This version includes:
    • Fixed error were an illegal character on a package title will throw errors when trying to do a backup.
     
  41. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Version 2.0.3 has been submitted to the asset store for review. This version includes:
    • Fixed error were an illegal character on a package title will throw errors when trying to do a backup. (from 2.0.2)
    • Fixed error where system will not filter installed shared packages with the Unity version.
     
  42. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Thanks, it's working and is quite a useful asset. It didn't look like you had really added in any of the new features yet and I was kinda waiting to do a review until it had a full feature set. If those are going to be a ways off, let me know and I'll just review it as is.
     
  43. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Awesome, good to know that is working.

    If you have a version 2.0+ imported you should already have all the listed features. Or are you talking about anything specific?
     
  44. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    I was talking about the ability to add and search on tags and a way to have a list of assets that are imported at once. Those were the two features that I was most hoping for.
     
  45. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Those features are currently being implemented, so for next update they will be available.
     
  46. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Great, really looking forward to it!
     
  47. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Version 2.0.3 is now live on the asset store!
     
  48. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Version 2.1 is almost completed, @reggie_sgs the label system has been implemented and is currently being tested. Here's a quick preview.

    Packages will be able to have multiple labels (limit will be around 15), this labels will be the same as the Unity labels so any custom label will be displayed here too. You will be able to create custom labels for the packages at this window too. Search filter can filter packages with labels, same way as unity project window search works.

    ezgif.com-optimize.gif
     
    reggie_sgs likes this.
  49. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Does that mean if you tag an asset with a label, that label then shows up in your project's labels? That wouldn't be an ideal situation as the labels you use in a project for labeling game items wouldn't really correspond to the same types of labels that would be helpful in labeling packages.
     
  50. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Quick question, does the limit of 15 apply to how many unique label names you can use across all packages or how many labels that can be assigned to a single package?