I updated Unity a couple of days ago, and it seems that monodevelop is the standart editor now.
I love it ,but it finds me some strange errors in places where unitron didn’t mind. i’ve got the Radar script from Dastardly banana and it used to work great. Now it shows me an error “‘transform’ is not a member of object” , and i’ve been brain washing myself a few days trying to figure this out. I’m pretty new to Unity but i gave all i had, if someone could help me out, it’ll be greatly appreciated.
function drawBlip(go,aTexture){
var centerPos = centerObject.position;
var extPos = go.transform.position;
// first we need to get the distance of the enemy from the player
var dist=Vector3.Distance(centerPos,extPos);
var dx=centerPos.x-extPos.x; // how far to the side of the player is the enemy?
var dz=centerPos.z-extPos.z; // how far in front or behind the player is the enemy?
Transform is not a member - Line ‘var extPos’
function DrawBlipsForEnemy(){
// Find all game objects with tag Enemy
var gos : GameObject[];
gos = GameObject.FindGameObjectsWithTag("Enemy");
var distance = Mathf.Infinity;
var position = transform.position;
// Iterate through them
for (var go : GameObject in gos)
{
drawBlip(go,blip);
}
}
I tried changing ‘var go : GameObject’ and then reffering it to ‘GameObject in gos’ but it didn’t help.