- Home /
get variable type and name
How get variable type from function without sending it in function (boolean, string, float) etc?
class gettype extends MonoBehaviour {
var btest : boolean;
var tessst : tessst = tessst();
function Start() {
btest = tessst.getinfo();
}
}
class tessst {
function getinfo() {
Debug.log('btest type.ToString()');
return true;
}
}
Comment
change Debug.log('btest type.ToString()'); to Debug.Log(btest.GetType() );
Answer by Anusha · Sep 05, 2012 at 06:10 AM
class tessst {
function getinfo() {
Debug.log(btest.GetType());
return true;
}
}
just being clear what @rcstarttofinish actually said. [though it was very clear]