Search Unity

Assets [WIP] Omnibar - the quick search bar & more

Discussion in 'Works In Progress - Archive' started by xenonmiii, Jan 31, 2019.

  1. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    Hi all,
    I'm doing a quick search tool which you can launch with a shortcut and type away, similar to Haste/Alfred/Spotlight etc, where it indexes all your assets and hierarchy. You can also access all menu items including plugins'.

    Trailer


    Download from the asset store
    http://u3d.as/1sN9

    Search Anything


    Camel Case Search


    Omnibar also supports special commands to quickly access certain dialogs like build settings, project settings, light settings, etc. It can be also used as a command launcher to speed up frequent commands, like:

    Un/Loading scenes



    Resetting pos/scale/rot



    Grouping by a name



    Quick access to Unity menu items


    Download from the asset store
    http://u3d.as/1sN9

    Feedback Wanted
    Any shortcuts you think should be part of this tool, just leave a comment here (or PM me) and I will see what I can do.

    If you have any bugs to report, you can PM me the issue together with the logs found in <YourProject>/Library/OmnibarLog.txt. This will only contain filenames which will help me debug some issues which might be encountered.

    Looking forward for your feedback.

    To-Do List:
    You can view the public to-do board (trello) here, which I will be updating with your suggestions/bug reports:
    https://trello.com/b/A0jsSovL/omnibar

    Some tech details:
    When you press Ctrl-G (or Command-G on Mac) for the first time it will launch a process which will act as a server. The server will be responsible for keeping an index (saved in the Library folder of your project). This indexing can take some time, depending on your project's number of assets.The decision of having a separate process was taken because if the index data was kept in the editor window, the index would be lost (because Unity destroys the instance or static data on every recompile), or otherwise would have to serialize/deserialize every time you made a search which is not ideal since it slows down the flow, which defeats the purpose of this tool. Therefore a separate process (server) was created which will index the assets for the first time and serialize it once. Asset changes (additions, renames, deletions) will be processed server side too. As regards for the scene, the current scene hierarchy will be re-indexed on every change and is also not serialized. This is because Unity doesn't tell what changed on a scene operation. So serializing hierarchy data felt futile too.
     
    Last edited: Mar 22, 2019
  2. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    Last edited: Mar 22, 2019
  3. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    Here's a quick demo on how to create a prefab.

    Create a prefab



    First you select the object in the Hierarchy (you can also use Omnibar).
    Then you just use the Create Prefab command.
    The prefab will be created in the last folder you had selected in the Project view (which btw can also be selected from Omnibar)
     
    Last edited: Feb 12, 2019
  4. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    Last edited: Mar 22, 2019
  5. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    You can now access all Unity menu items (including other plugins menu items) from Omnibar in v0.2.2.
    Also fixed an issue with Windows version not indexing files properly.

    Release Notes:

    v0.2.2 - 2019/02/14
    ===================
    NOTE: On first launch the serialized state of the server will be removed

    Added
    -----
    * https://trello.com/c/323wR7hh/122-add-support-for-all-menu-items
    You can know access any menu item in Unity

    Fixed
    -----
    * [MAC] Fix #124: https://trello.com/c/LLI09eUH/124-make-server-on-mac-hidden
    * [WIN] Fix #125: https://trello.com/c/nsyu83RR/125-windows-is-not-indexing-project-files-properly
     
    Last edited: Mar 22, 2019
  6. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    Released another build, v0.2.3.
    You can now create custom commands by simply using the [OmnibarCommand] attribute near static methods.
    Also if you use a more frequent item, it should be prioritized accordingly now.

    v0.2.3 - 2019/02/19
    ===================
    NOTE: On first launch the serialized state of the server will be removed

    Added
    -----
    * Google analytics usage
    * https://trello.com/c/zatImMpe/123-custom-commands
    You can know add custom commands using OmnibarCommand attribute
    [OmnibarCommand("Title", "Description")]
    public static void TestCommand()
    {
    //do something
    }
    * https://trello.com/c/TCI7u4S0/130-narrow-down-menu-items-with-menu-or-mi-or-menuitems
    Just type "mi:" to narrow down your search to all Unity menu items

    Fixed
    -----
    * Fix #128: https://trello.com/c/Y8SRh7L1/128-s...ed-causing-it-to-not-accept-any-other-command
    * Fix #129: https://trello.com/c/DVzll3FR/129-g...default-menu-items-should-have-a-higher-value
     
    Last edited: Mar 22, 2019
  7. JohnnyDalvi

    JohnnyDalvi

    Joined:
    Nov 24, 2016
    Posts:
    7
    Awesome asset man, congrats.
     
    xenonmiii likes this.
  8. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    Here's an example on how to create a simple custom command to reset the position of the current selected item/s (already implemented in Omnibar)

    First you have to add
    using PolyCrunch.Omnibar;
    at the top

    Then you have to create a static method in some class and using the OmnibarCommand attribute.

    Code (CSharp):
    1. [OmnibarCommand("Reset Position", "Resets the position of the currently selected items")]
    2. public static void ResetPosition()
    3. {
    4.     //you might also want to record an Undo operation, e.g.
    5.     var array = new Transform[Selection.gameObjects.Length];
    6.     for (var i = 0; i < Selection.gameObjects.Length; i++)
    7.     {
    8.         var t = Selection.gameObjects.transform;
    9.         array = t;
    10.     }
    11.     Undo.RecordObjects(array, "Reset Position");
    12.  
    13.     //do the actual change
    14.     foreach (var go in Selection.gameObjects)
    15.     {
    16.         go.transform.localPosition = Vector3.zero;
    17.     }
    18. }
    We can easily share custom commands that people find useful and add them to the library in a future build. I could also optionally add the author so when people use a custom command they would know who is saving their time :)
     
    manpower13 likes this.
  9. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    Those who will be giving valuable feedback on Omnibar, I will be giving them a free asset store key once it's ready to be pushed live on the asset store :)
     
  10. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    Released a maintenance build, v0.2.4, where I fixed some issue with recent items list, and also with prioritizing of frequently used items.

    Release Notes:
    v0.2.4 - 2019/02/22
    ===================
    NOTE: On first launch the serialized state of the server will be removed

    Added
    -----
    * https://trello.com/c/8h1jKC6f/135-add-a-menu-item-to-delete-omnibar-index-just-in-case
    * https://trello.com/c/00ZeGSUM/137-link-to-online-documentation

    Fixed
    -----
    * Fix #139: https://trello.com/c/cFy5YM0H/139-menu-item-does-not-get-listed-in-recent-items
    * Typos in help window
    * Fixed order of menu items in Window/Omnibar
    * Fix #141: https://trello.com/c/5KHOMKyP/141-ls-is-not-giving-the-appropriate-priority-not-even-after-using-it
     
    Last edited: Mar 22, 2019
  11. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    A couple of friends of mine noticed that you cannot click on the visible items. So now you will get some feedback when you try clicking on a result item :D



    P.S. This dialog will only be shown once... it will actually execute the item after dismissing the dialog and from then on ;)
     
  12. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    Fixed some bugs and add some more shortcuts to speed up stuff, like moving files or gameobjects, etc.
    Also updated a bit the UI.

    Release Notes:
    v0.2.5 - 2019/02/27
    ===================
    NOTE: On first launch the serialized state of the server will be removed

    Added
    -----
    * Added README.txt as required by Unity Asset Store
    * To Add Component add + before the script name
    https://trello.com/c/rODZpq7Z/146-m...ponent-to-the-current-selection-add-component
    * f: for filtering folders
    Fix #149: https://trello.com/c/WlHIMfiX/149-shortcut-for-folders-f
    * Duplicate any item with Alt-Enter
    https://trello.com/c/u2UJAeJQ/159-duplicate-any-item-by-altenter
    * To Move current selection to any item add > before the item
    https://trello.com/c/KwXbu9RF/136-move-current-selection-to-somewhere-else-change-parent
    * Duplicate any gameobject by doing + before its name
    https://trello.com/c/eVrH5iOj/164-duplicate-a-gameobject-by-just-doing
    * To Delete any item add - before the item name
    https://trello.com/c/y8wMQoj2/156-delete-any-item-with
    * Reset Preferences menu item

    Fixed
    -----
    * Fix #85: https://trello.com/c/l40pv1ns/85-clicking-on-items-doesnt-work
    * Fix #148: https://trello.com/c/gTQfXSP2/148-m...abel-but-a-new-one-not-blue-selection-of-text
    * Fix #153: https://trello.com/c/PTZKsntM/153-menu-items-are-not-being-indexed-properly-only-player-settings
    * Fix #154: https://trello.com/c/ZgIQxO8w/154-if-you-type-quit-before-hitting-enter-the-server-will-be-killed
    * [MAC] Fix #168: https://trello.com/c/6QNd6F0v/168-exception-when-launching-omnibar-server
    * [MAC] Fix #167: https://trello.com/c/mAfn9ibo/167-weird-layout-on-mac-retina-displays
    * Fix #183: https://trello.com/c/VbEuh7Ge/183-i-is-currently-saying-unknown-filter-should-be-same-for-textures
    * Fix #185: https://trello.com/c/OXDdbzdu/185-models-not-supported

    Modified
    --------
    * Removed fuzzy search as it was being too fuzzy and getting confusing getting unrelated results
    * Improved FTUE by displaying Help immediately, and a button to edit the shortcut
    * Improvement in UI
    - Blinking cursor
    - Tip in titlebar
    - Color changes
     
    Last edited: Mar 22, 2019
  13. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    Did a trailer video (draft). Of course you cannot download it from the asset store yet as still tweaking and fixing some stuff ;)

     
  14. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    Omnibar has been released on the Asset Store!

    Download now from the asset store
    http://u3d.as/1sN9
     
  15. manpower13

    manpower13

    Joined:
    Dec 22, 2013
    Posts:
    140
    Used the product in beta, and now downloaded the version from the asset store... It's great! It's very fast, works easy and the developer is very responsive.

    It makes you wonder why it's not implemented in Unity by default.

    [Disclaimer, I got a free key]
     
  16. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144
    Very useful tool, love it :) Is there a way to remove the logs for pending asset changes ? I keep getting them all the time and it's a little bothersome to have to clear the console each time.

    Thanks !
     
  17. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    Hi @SpyrosUn,
    That must have fallen through the cracks of my humble QA procedure ... woops :)
    I am soon going to release an update. Will be wrapping it up today or tomorrow.

    If you can't wait for Unity's approval time, PM me and I will see how I can get you a build.
     
  18. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    @SpyrosUn, until a proper fix is rolled out you can try the following:
    Press Ctrl-G to get the Omnibar window. Then type
    VL=off


    That should set Omnibar's Verbose Logging to off, which is off by default. But is being wrongly initialised at the moment. So you might need to do this every time you launch Unity, until the fix is rolled out.
     
  19. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144
    Thanks a lot ! No worries, I can wait for the fix, thanks again for responding to this so quickly !

    Btw, i do get :

    Could not find custom command item VL
    UnityEditor.AssetPostprocessor:LogError(String)
    and
    <color=red>[Omnibar]</color> Did not know how to process VL=off
    when trying this.
     
  20. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    @SpyrosUn Hmmm so when you type VL, "Verbose Logging" is not shown as an entry?
    If it isn't show up, will it show up after doing Window->Omnibar->Delete Index? (it will just reindex the everything)

    Btw, I've just uploaded a build for Unity to review. Should be available in a couple of days.
     
  21. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    @SpyrosUn v1.0.3 is now live on the asset store. You can update Omnibar
     
    SpyrosUn likes this.
  22. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144
    Hi, I have a couple of questions about omnibar (which i love btw, super useful :)

    1) If i have a Monobehavior class named, say, UIMenuObject and it is a component of a gameobject(or more than one) in my scene, is there a way to get to those gameobjects via omnibar ? I have only been able to find hierarchy items based on their names, but it would be extremely useful to find gameobjects based on components. Btw, the default Unity editor search inside the hierarchy does that by default , but I wish i could do that within omnibar. Probably omnibar does it too, but I just can't see how to get to it.

    2) I am using Script Inspector, which is a fantastic asset in the store, that allows you to write code from inside the Unity editor, in case you don't know about it. When my mouse is focused on this window, the Cmd + G hotkey for omnibar does not work. Not sure if this is something that can be fixed with omnibar or script inspector settings, but thought i'd ask, because it can be pretty frustrating.

    Thanks a bunch for the great asset and the help !
     
    Last edited: Jun 10, 2019
  23. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    @SpyrosUn Hi SpyrosUn,

    Re: 1) I will see what I can do on that

    Re: 2) Since the editor of Script Inspector has the focus, probably it's taking all the events and consuming them. I will investigate but cannot promise anything until I investigate further.