How do I make a wrap-screen for my caracter?

How so I make my caracter be able to have the wrap-around script on it. Can you please explain what I need to do this and how.

#pragma strict
var wrap:Vector2;

var wrapMax:Vector2;

function Awake(){

var wrapmin:Vector3=Camera.main.ScreenToWorldPoint(Vector3(0,0,Camera.main.transform.position.y));
wrap=Vector3(wrapmin.x-0.2,wrapmin.z-0.2);
var wrapmax:Vector3=Camera.main.ScreenToWorldPoint(Vector3(Screen.width,Screen.height,Camera.main.transform.position.y));
wrapMax=Vector3(wrapmax.x+0.2,wrapmax.z+0.2);
}

function Update () {

if(transform.position.x>wrapMax.x){
   transform.position.x=wrap.x;

}
if(transform.position.x<wrap.x){
transform.position.x=wrapMax.x;

}  
if(transform.position.z>wrapMax.y){
   transform.position.z=wrap.y;
}
if(transform.position.z<wrap.y){
   transform.position.z=wrapMax.y;
}
}