Switch prefabs when player levels up

I’ve been working on a simple space shooter based of the free 2D space shooter in the unity asset store and I’ve been trying to implement a game mechanic where when the player levels up, then the prefab will change to another prefab in the game. What would be the best way to script that?

On level up.
Delete old GameObject.
Instantiate New GameObject from Prefab.

If there is any state information on the old that needs to be copied to the new, copy it off the old into some variables before destroying, and copy them onto the new one after it’s created.

Thanks I will give that a try

If the new prefab is just for appearance reasons (rather than having different behaviour on it), then it may be simpler to have the root “player” object just have the logic and have the visible model as a child of that. Then you can just replace the child without needing to manually transfer any state info.