我在移动平台上收到此错误:“GetComponent”在移动平台上不是“对象”的成员,但在 Windows 上工作正常。请帮我解决这个问题。提前谢谢。:D
for (stage = 2; stage <= cells.length; stage++)
{
for (i = 0; i <= cells.length - 1; i++)
{
if (doorsToCells[i] == stage - 1)
for (var checkDoor : GameObject in cells[i].GetComponent(AIpathCellScript).… /*is is the line with error*/
{
if (checkDoor != gameObject)
{
for (var checkCell : GameObject in checkDoor.GetComponent(AIpathDoorScript)…
{
for (var j : int = 0; j <= cells.length - 1; j++)
{
if (cells[j] == checkCell && doorsToCells[j] == null)
doorsToCells[j] = stage;
}
}
}
}
}
}