0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Unity でscriptがよくわからない

Posted at

練習で、ブロック崩しをUnity で作っています。
参考にhttps://hu-gsd.com/lecture/unity-block-2/
をみながら作っているのですが、ゲームオーバー時には「Game Over」に変更するの欄がよくわからず失敗します。
もしかしたらscriptの書き方が間違っているのかもしれないのですが、『Textゲームオブジェクトを指定しましょう。』と言っていることがよくわからないです。

スクリーンショット 2024-05-29 062328.png
↑次はこのようにしなければいけないらしいのですが

using UnityEngine;

class GameOver : MonoBehaviour
{
// 衝突時に呼ばれる
void OnCollisionEnter(Collision collision)
{
// 当たったゲームオブジェクトを削除する
Destroy(collision.gameObject);
}
}
↑のようなコードから何かしらの方法で書き換えなければいけません。
書き手の言ってることが理解できず、行き詰っています。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?