The problem is that it generates an instance of the original prefab in the scene and I would like to avoid that, since the components in the prefab execute some editor code on Awake and that should not happen.
Isn’t there any other method that just creates the variant asset without instantiating it?
A variant of a Prefab it’s just an instance of that Prefab - you need one to create a variant.
One option is to create the instance in a PreviewScene and save that instance as a Variant. This is how we do it internally to avoid affecting the current scene.
Hi Mirceal, thank you for your answer. It’s nice to know that technical solution for not affecting the scene, but there must be another thing you do that lets Unity avoid executing the Awake method of the new variant. If I right click on a prefab and create a variant using the context menu, Awake is not called.