How can i switch to the next level after completing the task in level one?

please give a code or a tutorial on how to do this… please…

Add simple boolean var, for example “taskcompleted” to your script and change them to true after some task, next add something like ths to update(); :

if(taskcompleted == true)
Application.LoadLevel ("Level2");

In this case Level2 is the name of your next scene to load. That’s all.

The way I did it was I made a cube and set it as trigger, then add this script

//Script for next level
var levelToLoad : String;
function OnTriggerEnter(hit : Collider)

now just un-tick the mesh render in the inspector to make the cube transparent. When your player runs into the trigger the next level will load.