Search Unity

Is it possible to swap a script in a prefab variant?

Discussion in 'Prefabs' started by JeffersonTD, Aug 28, 2019.

  1. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    Let's say B and C are subclasses of class A. Is it possible to make a prefab variant that has C in the place of B used by the original prefab?

    I tried this in Editor and even though it's possible to swap the script like it has been somewhat always in Unity, this particular change doesn't get saved in the prefab variant, so once I open the variant again, it still has the original script. I tried to do this by modifying the YAML file manually, but didn't succeed in that either.

    So the question is: is this currently in any way possible? And if not, is there a plan to add support for this?

    I'm using Unity version 2018.4.2.
     
  2. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
  3. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268