i did have to use "using System;", i saw this in some example using the split somewhere.
This is the code im using, to basically tag a level and have my persistent UI react to a level by name.
What else does System contain, down the road i had gotten an error about converting char to string?
public void OnLevelLoad(string levelName){
//if we spawned in a level where we use the hud
string[] fullName=levelName.Split(' ');//splits via a space in the string
if(name[0].ToString()=="Menu"){
}else if(name[0].ToString()=="InGame"){
refTime=Time.time+preGameCountdownTime;
EnterGame(true);
}
}
↧