Change the character mesh and skeleton

Hi, i’ve programed all my code and everything on the pawn that i created for it, the main character of the game, but i’ve made a new skeleton with a new mesh to fix some older problems, can i change the skeleton and the mesh but keep all the code that i made? thanks