UnityのgameObjectの表示、非表示の切り替えをしたいです。
Start()の中で条件を判定してtrueだった場合のみ表示をさせたいです。
現状条件がtrueになりifの中に入っていることは確認できるのですがobjectが表示されません。何か間違ったことをしていますか?
よろしくお願いします。
public class Show : MonoBehaviour { public GameObject gameObject; // Start is called before the first frame update void Start() { if( 条件判定){ gameObject.SetActive(true); } } // Update is called once per frame void Update() { } }
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/05/21 14:10
2019/06/02 06:26