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 Specialize parent state machine in their prefab variants

Discussion in 'Visual Scripting' started by FirescaleStudios, May 10, 2021.

  1. FirescaleStudios

    FirescaleStudios

    Joined:
    Oct 29, 2019
    Posts:
    9
    Hi,

    we are having some problems finding a clean solution. We have a parent prefab that holds a bolt FSM with the general behaviour shared for all its variants. Now we need to specialize the behaviours of the general states in the variants created (like some kind of inheritance/override). Is there some kind of mechanism that let us do this without having to rely in if/select/switch in the parent (that will be a little mess).

    Best regards!
     
  2. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,106
    Bolt/current UVS architecture was developed awhile before nested prefabs and prefab variants were a thing so it's not supported (yet). And I don't believe any inheritance related polymorphism is in the plans. I've heard Unity devs mentioning Interfaces though, not sure how that'll look like yet.
     
  3. FirescaleStudios

    FirescaleStudios

    Joined:
    Oct 29, 2019
    Posts:
    9
    Ok, thanks for your help! It would be a great feature if the variants could change the parent FSM behaviour. I hope that the Unity devs implement this feature someday.