skill 5 is of type var but contains a float, so the first thing I'd try is

my_var = *(float*)&(my_material.skill5);