Search Unity

Question How can I add custom classes to the list of units automatically

Discussion in 'Visual Scripting' started by CitrioN, Apr 23, 2021.

  1. CitrioN

    CitrioN

    Joined:
    Oct 6, 2016
    Posts:
    98
    Hello,
    I'm trying to add custom classes to the list of supported units without having to enter them all manually in the setup/options wizard. I couldn't find any documentation for it.

    I'm working on an asset that uses many custom classes not derived from Unity's object.
    I can not really justify adding Bolt support for the asset if users would have to add each and every class manually.

    Thanks for your time and help.
     
  2. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,073
    There's [IncludeInSettings(true)] attribute that will expose classes to Bolt/UVS automatically once units are rebuilt/regenerated. Users would still have to manually rebuild the units, however.
     
    CitrioN likes this.
  3. CitrioN

    CitrioN

    Joined:
    Oct 6, 2016
    Posts:
    98
    Awesome. I was hoping something like that exists.
    Thanks for the help! Much appreciated.
    Does exactly what I need and it's not a big deal if users have to do a couple clicks to rebuild the units ;)