ブロック崩しを作っているのですが、ブロックを全て崩し終わってもクリアのSceneを出せません。そもそもGameObjectも足りているのかわかりません。
Assets\clear1.cs(13,58): error CS1061: 'GameObject' does not contain a definition for 'Length' and no accessible extension method 'Length' accepting a first argument of type 'GameObject' could be found (are you missing a using directive or an assembly reference?)
該当のソースコード
C#script
ソースコード
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class clear1 : MonoBehaviour
{
// Update is called once per frame void Update() { int count =GameObject.FindGameObjectWithTag("Block").Length; if(count == 0){ SceneManager.LoadScene("clear"); } }
}
試したこと
分からなくてここから進みません
補足情報(FW/ツールのバージョンなど)
クリアSceneの名前はclearだけです。
TagもBlockとなっています。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。