Search Unity

Question Adding Type Options and Node Library from editor script

Discussion in 'Visual Scripting' started by skoteskote, Oct 30, 2023.

  1. skoteskote

    skoteskote

    Joined:
    Feb 15, 2017
    Posts:
    87
    We have created a couple of private packages for our work that include several custom nodes and scripts that should be accessible from visual scripting. Currently, when adding these packages to a new project, these types are unavailable, even if your namespaces are added to the Node Library.

    Our current workaround is to add each script in the Type Options. This is time-consuming, so we wanted to know if there's a way to do this automatically from an editor script?
     
  2. Trindenberg

    Trindenberg

    Joined:
    Dec 3, 2017
    Posts:
    398
    Yes its definitely possible by adding manually to the dictionary. I haven't been active in a long time though so not sure where everything was, if you look in the code you will find the answer. :)
     
  3. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,076
    Decorating your class with [IncludeInSettings(true)] and regenerating nodes should automatically include custom types. If this is not the case, Unity have broken something and a bug report is likely in order.