I’ve been learning about Unity editor scripts lately, and I was wondering if there’s a way to take an array of objects and turn all of them into instances of a given prefab. Basically, the code equivalent of what happens when you alt+drag a prefab onto an object.
I’ve tried adding prefabs to my scene via code, but they get added as new instances, whereas I’m trying to replace an existing object with a prefab. Is this possible?