Hi there,
I’m trying to convert my code to work on the iphone but I’m having a little trouble with strict typing.
I’ve managed to figure most things out but these few errors are still getting me.
With the code below I still get
‘renderer’ is not a member of ‘UnityEngine.Object’.
and
‘transform’ is not a member of ‘UnityEngine.Object’.
Does anyone know how I could fix these?
Thanks
Pete
for (var y : float = 0; y < LevelsCompleted; y++)
{
var TargetPos = GameObject.Find("LRef_"+(y+1));
var CreatedLevelButton = Instantiate(LevelButton, Vector3(0, 0, 0), Quaternion.identity);
CreatedLevelButton.renderer.material.SetTexture("_MainTex", LevelButtonTexture[y]);
CreatedLevelButton.transform.parent = TargetPos.transform;
yield new WaitForSeconds (LevelButtonSeperation);
CreatedLevelButton.name = ("L"+(y+1));
LevelButtonsAreUp = true;
}
}