Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Custom Unit not showing on Fuzzy Search.

Discussion in 'Visual Scripting' started by morphex, Sep 4, 2020.

  1. morphex

    morphex

    Joined:
    Dec 18, 2012
    Posts:
    112
    Hey, I am currently working a plugin and I adding custom Units to bolt - pretty undocumented feature - and it seems they don.t show up in the Fuzzy Search.

    I have tried creating a simple unit like this

    Code (CSharp):
    1. [SpecialUnit]
    2.     [UnitCategory ("Custom")]
    3.     public class SampleUnit : Unit {
    4.         protected override void Definition () { }
    5.     }
    This does show up on the fuzzy search.
    I have tried adding the [IncludeInSettings(true)] attribute and it then shows up, but as a normal class.

    Oddly enough, if I change the Inheritance from Unit to EventUnit<emptyeventargs> it then shows up as an event, and if later I change it back to Unit, it keeps showing correctly.

    How does this work ? I was under the impression all derivatives of : Unit would show up on the FuzzySearch.

    What's even weirder, if I then got to Tool> Build Unit Options, then my custom unit doesn't show up on the fuzzy search anymore, BUT it still shows up on the Graph If I dragged it before, and I can copy paste it around.

    On a side note is there anywhere I can get get Source Code for Bolt ? Github ?
     
  2. Ex-Crow

    Ex-Crow

    Joined:
    Aug 14, 2020
    Posts:
    111
    Source is in the Install Bolt folder.
     
  3. morphex

    morphex

    Joined:
    Dec 18, 2012
    Posts:
    112
    So on small update, the issue seems to be it needs to have a Field in the Unit to actually show up in the "Fuzzy Search".
    @Ex-Crow I cant seem to find the source files anywhere ? Seems to have a bunch of compiled assemblies only.
     
  4. MasterSubby

    MasterSubby

    Joined:
    Sep 5, 2012
    Posts:
    252
    You're using SpecialUnit. The whole purpose of that attribute is in fact, to hide the unit in the search. But can still be shown through special means. Such as Macros populated into a category.