hi, i making web game with bunch of levels, how i can select level for loading?
what exactly do you mean? do you mean how do you choose what level to load in a script, or do you not know how to load a level at all? if you need a script i can try and help.
All you’ll have to do with these scripts is tell it when to load the level, for my example i’ll use OnTriggerEnter, but you can use whatever.
Javascript: (the players tag needs to be Player, and the object this is attached to needs to have IsTrigger on the mesh collider checked)
var LevelName:String;
function OnTriggerEnter(Other:Collider){
if(Other.collider.tag=="Player"){
Application.LoadLevel(LevelName);
}
}
C#: (Same info as Javascript example, also this is after the Public Class has been stated)
String LevelName;
Void OnTriggerEnter(Other:Collider){
if(Other.collider.tag=="Player"){
Application.LoadLevel(LevelName);
}
}
Note, this hasnt been tested, so there may be a few errors
the levels are streamed in the order in which they are in the build settings.
if you need explicit control you must use Unity Pro and Asset Bundles