Build the mesh directly instead of returning arrays which need to be copied to a new mesh. Also decrease the scope of some variables.
Build the mesh directly instead of returning arrays which need to be copied to a new mesh. Also decrease the scope of some variables.