Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Custom C# Event units not visible in fuzzy finder

Discussion in 'Visual Scripting' started by DjOxvr, Nov 17, 2020.

  1. DjOxvr

    DjOxvr

    Joined:
    Dec 3, 2019
    Posts:
    4
    I'm trying to write 2 pairs of custom units: An event Trigger and Receiver each. While the units themselves work and the code has proven itself to trigger the transitions required, getting the units to be available from the Fuzzy finder is proving a massive headache.

    I have attached the source for each unit pair. Let me outline the issues.
    SO_EventUnitPair: (Contains ScriptableObject event, trigger unit & receiver unit classes). Provides global events that can be referenced easily outside Bolt graphs.
    1. If placed in the project and adding SO_EventTrigger/Receiver to the bolt Unit Options Wizard, these units show up (See image below).
    1a. Note that the Receiver Event unit shows up twice for reasons unknown.
    2. Adding
    [IncludeInSettings(true)]
    to the type does not automatically add it to the fuzzy finder. It must be added in the unit options wizard.
    3. Placing the units in a different assembly (asmdef in parent folder) causes the units to no longer show up - irrespective of whether they are added to the unit options wizard or not. (Effect of this may not show until a Unity restart).​
    upload_2020-11-17_11-0-44.png

    GotoNextStateUnitPair: (Trigger & Receiver unit class) Allows anonymous (single) exit out of a 'state' for linear flows without the need to create a new unique event.
    1. Placing these units inside the project makes SO_EventUnitPair no longer show up in the fuzzy finder!?
    2. This unit pair does not show up in the fuzzy finder. Not on its own, not when added to the Unit Options Wizard, not when in (or outside) an asmdef. They were functional and showing up in the fuzzy finder during development in a separate project, but adding them to a new project fails to ever display them. This is true for both the target project as well as the error reproduction project I created to isolate the behaviour.​

    Generally the behaviour of getting custom written units to show up seems very unreliable, and inconsistent even.

    I would like to understand why this is happening, and to find a solution so I may have both unit pairs working in a single project.

    Please note I am aware of other custom event units such as Bolt.Addons.Community's Defined Events - however these do not suit my needs.
     

    Attached Files: