LoginSignup
0
0

More than 3 years have passed since last update.

Unity 3D入門 #13 [本を調べる処理]

Posted at

本を調べると、メッセージが表示されるようにします。
1. 調べることができる本は他のオブジェクトに比べて光るなど目立たせたい。
2. 本毎に個別のテキストを表示してほしい。

●調べることができる本は他のオブジェクトに比べて光るなど目立たせたい。
MaterialのEmissionによる自己発光により、オブジェクトを目立たせました。
参考URL:https://linemarker.hatenablog.com/entry/2019/01/01/234106
暗い世界だからできる手法ですが、問題はクリアしました。

スクリーンショット 2020-08-12 2.26.32(2).png

●本毎に個別のテキストを表示してほしい。

public string booktext;

上のようにpublic変数として本の内容を用意することで本毎にテキストを使えるようになりました。
また、publicでのテキスト入力について、改行が難しいため、下のURLを参照してtextareaを作成しました。
参考URL:https://zenigane138.hateblo.jp/entry/2018/07/31/225637

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