
Ask HN: Is it a bad practice to keep different versions in one build? - yunhan0
Hey there, here is the story. I have published one Unity plugin last year and got 2000+ downloads now. I want to make some breaking changes to the plugin but it will definitely affect users who have downloaded the old version. It is a paid plugin so I cannot just put the old version on Github release for example. I am trying to minimise the effects, but I don’t know if it’s a good thing to put different versions inside one build? My current solution is to add a suffix in my namespace such as Company.Product.v2, but is it a right way to do it? I haven’t handled this situation before, so I am looking for more opinions!
======
ablerman
In similar situations, I've left the old api as is and created a singleton to
contain each version.

    
    
      Plugin.getInstance('<version_number>')
    

Over time move people to that construct and eventually deprecate the old api.

