此语句中出现此错误我试图在Dropzone区域中获取图像对象,所有脚本均已附加到编辑器。我已经检查过了。找不到问题,请帮忙。 Error image
public void CardDetect()
{
D = new DropZone();
List<Image> listofcard = new List<Image>();
for (int i = 0; i<D.transform.childCount - 1; i++)
{
if (listofcard != null)
{
listofcard.Add(D.transform.GetChild(i).transform.GetComponents<Image>()[i]);
}
}
for(int i = D.transform.childCount - 1; i > 0; i--)
{
// this.PlaceholderParent.transform.Find("Pane").GetComponent<Image>().tag = "ileri"
if (D.transform.GetChild(i).transform.name == "ileriprefab1")
{
ileri = true;
}
if (D.transform.GetChild(i).transform.name == "sağprefab")
{
sağ = true;
}
if (D.transform.GetChild(i).transform.name == "solprefab")
{
sol = true;
}
if (D.transform.GetChild(i).transform.name == "fprefab")
{
f = true;
}
}
Blockquote Dropzone Script